{"componentChunkName":"component---src-templates-blog-detail-tsx","path":"/blog/2020-04-23-serverless-learn-scf","result":{"data":{"currentBlog":{"id":"b14f0796-64f5-5137-96eb-9c395a6bc3ab","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020523/1590216111548-16205.jpg","authors":["乂乂又又"],"categories":["user-stories"],"date":"2020-04-23T00:00:00.000Z","title":"万物皆可 Serverless 之我的 Serverless 之路","description":"本文主要介绍我和 Serverless 的结缘之路。","authorslink":["https://cloud.tencent.com/developer/article/1618591"],"translators":null,"translatorslink":null,"tags":["Serverless","个人博客"],"keywords":"Serverless,Serverless实战,Serverless应用","outdated":null},"wordCount":{"words":548,"sentences":86,"paragraphs":85},"fileAbsolutePath":"/opt/build/repo/content/blog/2020-04-23-serverless-learn-scf.md","fields":{"slug":"/blog/2020-04-23-serverless-learn-scf/","keywords":["python","serverless","无服务器","无服务器架构","云函数","Serverless","serverless","serverlesscloud","应用"]},"html":"<h2 id=\"缘起\"><a href=\"#%E7%BC%98%E8%B5%B7\" aria-label=\"缘起 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>缘起</h2>\n<p>我最早接触 Serverless 大概是在 18 年 6 月，那时候我在阿里云的学生机刚好到期，那台机子上我有装宝塔面板，然后在上面只放了一个 Typecho 的个人博客站，好像这台服务器似乎一直都是被我拿来当作虚拟主机用，最多也只是登上宝塔面板清一下内存这样子，所以，在我阿里云一年的学生机到期之后，我就果断选择了放弃续费服务器。从那时起我就变成了一个彻底的 Severlesser。</p>\n<p>首先是之前的静态网页的问题，这个解决起来比较简单，随便找一个对象存储或者 pages 服务就可以搞定。</p>\n<p>这里我是把自己那些静态网页都放到了 Coding pages 上，除了某些时候某些地区某些运营商的网络访问会不稳定之外，其他的一切都让我觉得 coding 的 pages 服务都是做的非常棒的。</p>\n<p>然后是 Typecho 博客问题，这个问题还是比较让人头大的，因为像这种动态的博客系统是很少有 pages 服务支持的，所幸在那个时候 coding 有一个动态 pages 的服务是允许个人发布动态博客的，包括 Wordpress 和 Typecho 之类，只可惜现在 coding 已经把动态 pages 的服务给去掉了，而我的之前放在 coding 上的动态博客现在也已经被归档了。</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216110643-16205.jpg\" alt=\"被清空的工作空间\"></p>\n<p>我也错过了 cloud studio 升级的提醒通知，直到旧版 cloud studio 完全下线我才在邮箱的垃圾邮件里找到当时的升级通知。这下子我就再也找不到存放着我动态博客的空间入口了，里面的文件也抢救不回来了 T^T</p>\n<p>有趣的是，在我的空间被归档后，仍然可以正常访问原来空间里的博客，只是再也找不到也进不去原来的空间了。于是自己赶紧在网页登录我的 Typecho 博客后台，把博客数据备份好导出，也算是一场有惊无险的风波了。就这样，自己没有服务器也过的好好的。</p>\n<h2 id=\"发展\"><a href=\"#%E5%8F%91%E5%B1%95\" aria-label=\"发展 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>发展</h2>\n<p>似乎一切都很平静的。自己 19 年开始自学 Flutter，整天忙着写 widget，维护 state，时不时看看 Github trending，逛逛dribbble，刷刷 V 站之类，期间自己也独立开发上线了一些小应用，纯粹出于自己的兴趣。</p>\n<ul>\n<li>一款简单的计算器应用</li>\n</ul>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216109835-16205.jpg\" alt=\"一款简单的计算器应用\"></p>\n<ul>\n<li>一个自动选课应用</li>\n</ul>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111571-16205.jpg\" alt=\"一个自动选课应用\"></p>\n<ul>\n<li>一个记单词应用</li>\n</ul>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216110588-16205.jpg\" alt=\"一个记单词应用\"></p>\n<p>但是这些应用都有一个特点，那就是没有自己的后端，只能向外展示页面，这就比较鸡肋了。所以我也一直在寻找合适的云数据库服务，想要给自己的应用增加后端的能力，方便后期管理会员信息之类。</p>\n<p>期间我有用过 Bmob，感觉还可以，主要是接入方便，管理起来数据也比较简单，而且 Bmob 的服务非常好，我在他们 SDK 群里提问题，都会有人及时处理，比较省心。</p>\n<p>这个阶段我是啥服务都尝试过，域名在西部数码，新网，阿里云，腾讯云都有注册，对象存储有用七牛云 cos 和腾讯云 cos，主机用过小学生卖的跑路虚拟空间，阿里云学生机，腾讯云学生机，视频点播服务用过乐视云和七牛云，CDN 用过知道创宇的加速乐，360CDN，腾讯云 CDN，移动用户数据信息统计有用百度移动信息统计，Growing IO，友盟...</p>\n<p>总之我用的服务都很杂，缺少一个东西把他们都整合起来，后面我会讲到这个东西其实就是腾讯云开发。可能你觉得我扯了半天都还没扯到 Serverless，不要着急哈，马上就到今天的主角 Serverless了</p>\n<h2 id=\"serverless-全新的世界\"><a href=\"#serverless-%E5%85%A8%E6%96%B0%E7%9A%84%E4%B8%96%E7%95%8C\" aria-label=\"serverless 全新的世界 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Serverless 全新的世界</h2>\n<p>上面我扯了那么一大堆是想告诉大家，在没有 Serverless 之前，自己开发上线一款应用，其实大多数的精力都是用在这些第三方服务的选择和适配上的，搞来搞去基本上都是在瞎折腾，应用开发效率非常差的。</p>\n<p>这样的话，作为对比，在这一节里，我就结合自己的开发经历跟大家讲下</p>\n<p><strong>Serverless 到底是啥，怎么用，用起来究竟有多爽？</strong></p>\n<p>首先我是在 Bmob 翻看官网首页的时候，看到他们有一个叫云函数的服务，乍一听云函数这个词我也是有些摸不着头脑的，云函数是什么？云上跑的函数？我本地函数跑的好好的，干嘛要放到云上跑？</p>\n<p>但是出于好奇我还是点进去看了下云函数到底是个啥东东，原来云函数真的就是放在云上的函数而已，它可以在本地通过 http 请求来调用，但看起来还是蛮不错的，刚想上手实操一波，发现这个云函数服务是付费的，</p>\n<p>额，这个就，好吧，穷就一个字，我只说一次，当然是果断关闭页面，忘掉它了，嘿嘿~ 就这样我与云函数的第一次见面就以不战而退告终了~</p>\n<p>直到后来我一个同学告诉我，腾讯云有一个云函数的服务可以用来解决前端跨域的问题，而且每月都有很多的免费额度！</p>\n<p><strong>哈哈，顷刻，大喜，遂上手之。</strong></p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216110304-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-23-serverless-cloud-cos/\">《万物皆可 Serverless 之免费搭建自己的不限速大容量云盘（5TB）》</a>里，我用腾讯云函数搭建了一个 20TB 的 OneDrive 网盘</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216112586-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-23-serverless-timer-scf/\">《万物皆可 Serverless 之使用云函数 Timer 触发器实现每天自动定时打卡》</a>里，我写了个每日健康信息自动定时打卡的云函数</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216504470-%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_15902165027885.png\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-23-serverless-scf-cos/\">《万物皆可Serverless之使用SCF+COS快速开发全栈应用》</a>里，我用云函数做了个影视搜索的全栈应用</p>\n<p>前后用时 3 天，第一天写云函数后端接口，第二天从零入门学习了一下前端，第三天开始整合前后端并上线发布应用</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216110728-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-23-serverless-wechat-cos/\">《万物皆可Serverless之使用SCF+COS免费运营微信公众号》</a>里，我用云函数给自己的公众号后台做了个消息自动回复系统</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216112207-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-23-serverless-scf-api/\">《万物皆可Serverless之使用SCF快速部署验证码识别接口》</a>里，我用云函数把本地的验证码识别程序快速上线发布成 api，方便调用。整个识别函数从本地到发布到线上可用，也就用时 10 分钟以内吧</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111398-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-23-serverless-kaggle-scf/\">《万物皆可Serverless之Kaggle+SCF端到端验证码识别从训练到部署》</a>里，我继续尝试使用 Kaggle+SCF 从训练到部署发布一个通用验证码识别模型，真正的验证码识别从训练到部署一条龙服务~</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111111-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-13-serverless-scf-wechat/\">《万物皆可Serverless之借助微信公众号简单管理用户激活码》</a>里，我尝试使用云函数和对象存储在自己的微信公众号后台管理会员激活码，在前面 SCF+COS 实践的基础上，稍微修改并重新上线发布了一下云函数，用时 10 分钟以内</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111337-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://serverlesscloud.cn/blog/2020-04-13-Serverless-scf-cos-python/\">《万物皆可Serverless之使用SCF+COS给未来写封信》</a>里，我使用云函数和对象存储制作了一个类似给未来写封信应用的全栈网页应用，在前面 SCF+COS 系列实践的基础上，我稍微修改并重新上线发布了一下云函数，整个应用从制作到上线发布可用，用时不超过 30 分钟</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111138-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://cloud.tencent.com/developer/article/1618589?from=10680\">《万物皆可Serverless之在Flutter中快速接入腾讯云开发》</a>里，我尝试在 Flutter 中接入腾讯云开发加速应用上云，为自己的 Flutter 应用实现了完整的后端能力</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111923-16205.jpg\" alt=\"serverless\"></p>\n<p>在<a href=\"https://cloud.tencent.com/developer/article/1618590?from=10680\">《万物皆可Serverless之在Flutter中写一个Dart原生腾讯云对象存储插件》</a>里，我尝试给 Flutter 写了一个对象存储的 dart 原生插件，整个插件可以直接跑在 dart VM 里，本地调试十分方便！</p>\n<hr>\n<p>总之，正如本系列文章标题所言，万物皆可 Serverless，过去那些需要自己购买配置服务器才能用的运行的应用，在 Serverless 云函数里也可以实现。那么，亲爱的你，为什么还要自己去购买，配置，维护服务器呢？</p>\n<h2 id=\"关于-serverless-的一切\"><a href=\"#%E5%85%B3%E4%BA%8E-serverless-%E7%9A%84%E4%B8%80%E5%88%87\" aria-label=\"关于 serverless 的一切 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>关于 Serverless 的一切</h2>\n<h3 id=\"what-is-serverless\"><a href=\"#what-is-serverless\" aria-label=\"what is serverless permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is Serverless?</h3>\n<p>乍一听 Serverless 还是比较懵逼的，说实话之前我也不清楚最近那么火的 serverless 技术究竟是啥。其实简单来说 serverless 就是单纯的不需要服务器的服务，比如域名解析、对象存储、CDN 这些，不需要你自己购买服务器就可以获得的服务，当然这里不需要服务器是指你自己不用掏钱去买配置运维服务器，但是整个服务的运行还是得靠你的 serverless 服务提供商通过跑在服务器上应用来解决的。</p>\n<p>看起来有点绕哈，那我再来打个比方吧，我们把服务器比作房子，你要在服务器上跑的应用比作你在这间房子里要做的买卖，传统的自行搭建服务器运行服务的模式：假如你要开一家店做买卖，你就得先租一间房子，然后自己装修房子，费好大劲装修完房子才能开始做买卖，而且这个房子你从装修开始就得一直按月给房租，即使你在这个房子里什么都不做也要给钱。</p>\n<p>Serverless 运行服务的模式：那么 Serverless 就是，我这里的房子已经装修好了，你直接过来做买卖就可以，而且你也不用按月交钱，我只在你做买卖的时候才计费，你做一个小时买卖那我就收你一个小时的服务费，你做一个小时买卖，休息十小时，那我还是只收你一个小时的服务费，怎么样是不是很良心。</p>\n<p>这么看其实用电话卡套餐月租和按量付费这种关系来做比喻会更合适一点。可以看到，Serverless 对比传统服务器应用模式最大的优点就是方便、省钱和免运维。</p>\n<h3 id=\"why-serverless？\"><a href=\"#why-serverless%EF%BC%9F\" aria-label=\"why serverless？ permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why Serverless？</h3>\n<p><strong>多快好省，但用难回。</strong></p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216110582-16205.jpg\" alt=\"用户评价\"></p>\n<p>正如 Serverless 开发人员所言 —— Serverless架构是必然，Serverless 开发应用超级快，超级简单，Serverless 直接面向业务开发，每个前端工程师都可以是全栈的，Serverless 可以更多快好省的开发应用</p>\n<p><a href=\"http://serverless.com/\">serverless.com</a> 的CEO Austen Collins 也曾经说过： </p>\n<blockquote>\n<p>Serverless is the future of the cloud. Serverless is like superpowers for developers.\n—— Austen Collins (serverless.com CEO)</p>\n</blockquote>\n<p><strong>Serverless 是云服务的未来！Serverless 赋予开发者超能力！</strong></p>\n<p>以前我没亲自体验过 Serverless 不会相信这句话，觉得是在吹牛或者不知道他在说些什么，但是现在我只觉得十分的震撼，感觉 Serverless 像是为开发者打开了一扇全新世界的大门，</p>\n<p><strong>Serverless 重新赋予了开发者跨越前后端，跨越语言的超级能力。</strong></p>\n<p><strong>（没错，这句是我说的，不对你过来打我啊~）</strong></p>\n<p>这是未来应用开发的大势所趋，下一代的应用将是 Serverless 的。借助 Serverless，后端开发者可以快速开发上线发布自己的应用，借助 Serverless，前端开发者可以直接获得后端的全部能力，快速开发全栈应用！所以我向所有开发者推荐 Serverless，无论你是前端或是后端开发者，你都可以通过 Serverless 获取到更加强大、更加便捷的能力。</p>\n<p><strong>相信我，你会爱死 Serverless 的，它会彻底颠覆你的多端应用开发体验。</strong></p>\n<h3 id=\"how-serverless？\"><a href=\"#how-serverless%EF%BC%9F\" aria-label=\"how serverless？ permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How Serverless？</h3>\n<p><strong>看到这里的话，相信你已经被 Serverless 深深吸引了，所以现在抽出一点点时间快速上手体验一下 Serverless？</strong></p>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111591-16205.jpg\" alt=\"serverless.com\"></p>\n<p>我推荐大家可以先去看一下 <a href=\"https://serverless.com/cn/\">serverless.com 中国区官网</a>和 <a href=\"https://serverlesscloud.cn/\">Serverless 中文社区</a>，在这里你可以详细了解关于Serverless的一切，也可以体验一些关于 Serverless 的最佳实践。</p>\n<p>而且就在前不久腾讯 Serverless Framework 正式发布。这是由腾讯云提供的专为中国开发人员定制的 Serverless Framework 版本，为 Serverless 应用程序开发提供了顶级的顺畅体验。</p>\n<p>试用地址：<a href=\"https://github.com/serverless/components/blob/master/README.cn.md\">https://github.com/serverless/components/blob/master/README.cn.md</a></p>\n<h2 id=\"serverless-面向未来的运维方式\"><a href=\"#serverless-%E9%9D%A2%E5%90%91%E6%9C%AA%E6%9D%A5%E7%9A%84%E8%BF%90%E7%BB%B4%E6%96%B9%E5%BC%8F\" aria-label=\"serverless 面向未来的运维方式 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Serverless 面向未来的运维方式</h2>\n<p><img src=\"https://img.serverlesscloud.cn/2020523/1590216111758-16205.jpg\" alt=\"Serverless 面向未来的运维方式\"></p>\n<blockquote>\n<p>网络应用正在慢慢改变世界，但是大多数互联网企业仍然无法顺畅交付工程，更不用说敏捷开发和快速迭代了。<strong>所以我们必须从根本上简化应用工程的交付和操作。</strong>\n这就是<strong>无服务器架构</strong>所提供的 serverless 建立在下一代公共云服务之上，该服务仅在使用时自动扩容和收费。当规模， 所用容量和成本管理实现自动化时，可节省 99% 的成本管理。\n无服务器架构是全新的，因此我们需要改变先前对老架构和工作流的看法。serverless 的目标是以一种简单，强大 而优雅的使用体验为开发者，团队提供开发和运行 serverless 应用程序所需的所有工具。</p>\n</blockquote>\n<p>serverless 加油鸭！</p>\n<hr>\n<div id='scf-deploy-iframe-or-md'></div>\n<hr>\n<blockquote>\n<p><strong>传送门：</strong></p>\n<ul>\n<li>GitHub: <a href=\"https://github.com/serverless/serverless/blob/master/README_CN.md\">github.com/serverless</a></li>\n<li>官网：<a href=\"https://serverless.com/\">serverless.com</a></li>\n</ul>\n</blockquote>\n<p>欢迎访问：<a href=\"https://serverlesscloud.cn/\">Serverless 中文网</a>，您可以在 <a href=\"https://serverlesscloud.cn/best-practice\">最佳实践</a> 里体验更多关于 Serverless 应用的开发！</p>","tableOfContents":"<ul>\n<li><a href=\"/blog/2020-04-23-serverless-learn-scf/#%E7%BC%98%E8%B5%B7\">缘起</a></li>\n<li><a href=\"/blog/2020-04-23-serverless-learn-scf/#%E5%8F%91%E5%B1%95\">发展</a></li>\n<li><a href=\"/blog/2020-04-23-serverless-learn-scf/#serverless-%E5%85%A8%E6%96%B0%E7%9A%84%E4%B8%96%E7%95%8C\">Serverless 全新的世界</a></li>\n<li>\n<p><a href=\"/blog/2020-04-23-serverless-learn-scf/#%E5%85%B3%E4%BA%8E-serverless-%E7%9A%84%E4%B8%80%E5%88%87\">关于 Serverless 的一切</a></p>\n<ul>\n<li><a href=\"/blog/2020-04-23-serverless-learn-scf/#what-is-serverless\">What is Serverless?</a></li>\n<li><a href=\"/blog/2020-04-23-serverless-learn-scf/#why-serverless%EF%BC%9F\">Why Serverless？</a></li>\n<li><a href=\"/blog/2020-04-23-serverless-learn-scf/#how-serverless%EF%BC%9F\">How Serverless？</a></li>\n</ul>\n</li>\n<li><a href=\"/blog/2020-04-23-serverless-learn-scf/#serverless-%E9%9D%A2%E5%90%91%E6%9C%AA%E6%9D%A5%E7%9A%84%E8%BF%90%E7%BB%B4%E6%96%B9%E5%BC%8F\">Serverless 面向未来的运维方式</a></li>\n</ul>"},"previousBlog":{"id":"07918513-5a0f-5c41-b33c-209be7389654","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/202068/1591592273724-70zt6hhv58%20%281%29.png","authors":["乂乂又又"],"categories":["user-stories"],"date":"2020-04-23T00:00:00.000Z","title":"万物皆可 Serverless 之使用云函数 SCF+COS 快速开发全栈应用","description":"我是在一个前端初学者的背景下，前后仅花了大概三天的时间，就完成了一个比较简单的网页应用，这就是 Severless 的魅力所在，它可以让你快速开发上线全栈应用，无论你是前端或是后端开发者都可以获益许多。","authorslink":["https://cloud.tencent.com/developer/article/1612750"],"translators":null,"translatorslink":null,"tags":["全栈应用","云函数"],"keywords":"Serverless,Serverless全栈,Serverless应用","outdated":true},"wordCount":{"words":340,"sentences":82,"paragraphs":82},"fileAbsolutePath":"/opt/build/repo/content/blog/2020-04-23-serverless-scf-cos.md","fields":{"slug":"/blog/2020-04-23-serverless-scf-cos/","keywords":["java","python","serverless","spa","腾讯云无服务器云函数","无服务器","无服务器云函数","云函数","函数","cos","json","serverlesscloud","event","blackMap"]}},"nextBlog":{"id":"4c7906fb-df88-5132-96f0-3613754d9e05","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/202068/1591592316812-13ui2js5xx.png","authors":["乂乂又又"],"categories":["user-stories"],"date":"2020-04-23T00:00:00.000Z","title":"万物皆可 Serverless 之使用云函数 Timer 触发器实现每天自动定时打卡","description":"本文并不探讨如何编写自动化的操作脚本，而是和大家介绍一下如何使用腾讯云函数的 Timer 触发器实现定时任务，来快速、稳定、低成本地实现一些 fancy 的操作。","authorslink":["https://cloud.tencent.com/developer/article/1612169"],"translators":null,"translatorslink":null,"tags":["Serverless","云函数"],"keywords":"Serverless,云函数触发器,Serverless应用","outdated":null},"wordCount":{"words":196,"sentences":60,"paragraphs":60},"fileAbsolutePath":"/opt/build/repo/content/blog/2020-04-23-serverless-timer-scf.md","fields":{"slug":"/blog/2020-04-23-serverless-timer-scf/","keywords":["java","python","serverless","spa","云函数","message","errorinfo","函数","mail","requests","toAddr","email"]}},"recommendBlogs":{"edges":[{"node":{"id":"4300b21c-7209-5256-86ff-0d38e3daec9b","frontmatter":{"thumbnail":"https://main.qcloudimg.com/raw/14f1c8eed372e76c1b139703b2f6d0fa.jpg","authors":["KieranMcCarthy"],"categories":["user-stories","engineering-culture"],"date":"2018-01-09T00:00:00.000Z","title":"我是如何在四年时间里，从厨师转行为 Serverless 应用开发者","description":"我是厨师出身，现在成为了一名 Serverless 应用开发者。","authorslink":["https://serverless.com/author/kieranmccarthy/"],"translators":["Aceyclee"],"translatorslink":["https://www.zhihu.com/people/Aceyclee"],"tags":["应用开发","Serverless"],"keywords":"Serverless 应用开发,Serverless 管理,厨师转行为 Serverless 应用开发者","outdated":null},"wordCount":{"words":285,"sentences":38,"paragraphs":36},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-01-09-from-chef-to-serverless-developer-in-4-years.md","fields":{"slug":"/blog/2018-01-09-from-chef-to-serverless-developer-in-4-years/","keywords":["无服务器","无服务器开发","云函数","学习","Serverless","构建","Framework","开发者","服务器","应用","学位","简历"]}}},{"node":{"id":"713a0563-4bf9-5721-bacb-3b4ef609fe4a","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/camp-fire/camp-fire-housing-thumb.jpg","authors":["EricWyne"],"categories":["guides-and-tutorials","user-stories"],"date":"2018-12-05T00:00:00.000Z","title":"Serverless Twitter 机器人帮助为坎普山火受灾者安置住房","description":"加利福尼亚州的坎普山火致使数千人流离失所，为此，我构建了一个简单的 Serverless Twitter 机器人来帮助将受灾者安置在临时住房！","authorslink":["https://serverless.com/author/ericwyne/"],"translators":["Aceyclee"],"translatorslink":["zhihu.com/people/Aceyclee"],"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":157,"sentences":26,"paragraphs":26},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-12-05-serverless-twitter-camp-fire.md","fields":{"slug":"/blog/2018-12-05-serverless-twitter-camp-fire/","keywords":["serverless","无服务器","云函数","Serverless","org","住房","Twitter","函数","受灾","机器人","山火"]}}},{"node":{"id":"98602143-b837-5f50-a24f-3b1ec76044d7","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/sqquid/sqquid-serverless-thumb.jpg","authors":["RonPeled"],"categories":["user-stories"],"date":"2018-12-17T00:00:00.000Z","title":"SQQUID：100% 无服务器初创公司","description":"SQQUID 将 AWS Lambda 和无服务器框架用于其核心产品和营销网站。我们来看看一个完全无服务器的初创公司是怎样的。","authorslink":null,"translators":null,"translatorslink":null,"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":266,"sentences":42,"paragraphs":42},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-12-17-sqquid-one-hundred-percent-serverless.md","fields":{"slug":"/blog/2018-12-17-sqquid-one-hundred-percent-serverless/","keywords":["go","serverless","无服务器","无服务器架构","服务器","架构","Lambda","集成","FaaS","串行","系统"]}}},{"node":{"id":"29dc2e58-d2ba-56f9-aee1-d21b0bc62e0e","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/ao-com-story/ao-serverless-thumbnail.png","authors":["NickGottlieb"],"categories":["user-stories"],"date":"2019-04-24T00:00:00.000Z","title":"AO.com：逐渐转向无服务器优先","description":"AO.com 的 SCV 团队率先尝试无服务器服务。折服于无服务器框架的快速周转时间和低维护成本，整个团队逐渐转向无服务器优先。","authorslink":null,"translators":null,"translatorslink":null,"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":236,"sentences":42,"paragraphs":35},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-04-24-ao-serverless-first.md","fields":{"slug":"/blog/2019-04-24-ao-serverless-first/","keywords":["serverless","无服务器","服务器","团队","Lambda","功能","构建"]}}},{"node":{"id":"752d08d1-387a-5bde-acf3-98141baab294","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020414/1586871710979-%E5%85%AC%E5%85%B1%E7%94%A8.png","authors":["Anycodes"],"categories":["user-stories"],"date":"2019-06-20T00:00:00.000Z","title":"如何用 Serverless 为 Python 云函数打包依赖","description":"在使用无服务器云函数SCF时通常会遇到导入第三方库的问题，很多小伙伴比较头疼是：应该如何打包进去？这里，推荐几个不错的方法。","authorslink":["https://zhuanlan.zhihu.com/ServerlessGo"],"translators":null,"translatorslink":null,"tags":["云函数","Serverless"],"keywords":"Serverless,Serverless应用,无服务器云函数","outdated":null},"wordCount":{"words":81,"sentences":43,"paragraphs":43},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-06-20-for-python-cloud-functions.md","fields":{"slug":"/blog/2019-06-20-for-python-cloud-functions/","keywords":["java","serverless","无服务器","无服务器云函数","云函数","serverlesscloud","安装","serverless","pillowtest"]}}},{"node":{"id":"2dc78814-9d77-555b-a1bb-ad202c8ec2d1","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/cloudforecast/thumbnail.png","authors":["FrancoisLagier"],"categories":["user-stories"],"date":"2019-08-07T00:00:00.000Z","title":"Serverless：初创企业的理想选择？（CloudForecast 案例分析）","description":"CloudForecast 是 2018 年成立的一家独立初创企业，本文将介绍他们决定选择 Serverless 的原因。","authorslink":["https://serverless.com/author/francoislagier/"],"translators":["Aceyclee"],"translatorslink":["zhihu.com/people/Aceyclee"],"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":211,"sentences":29,"paragraphs":29},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-08-07-serverless-for-startups.md","fields":{"slug":"/blog/2019-08-07-serverless-for-startups/","keywords":["serverless","云函数","serverless","函数","Serverless","utm","Framework","blog","CloudForecast","cloudforecast"]}}},{"node":{"id":"97450b07-658b-5207-8216-1c7b9b51b115","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020114/1578988490344-v2-8b2cd2c5275aa2c5a3c5083a148a7a9f_1200x500.jpg","authors":["Anycodes"],"categories":["user-stories"],"date":"2019-09-01T00:00:00.000Z","title":"如何通过 Serverless 与自然语言处理，让搜索引擎「看」到你的博客","description":"Serverless 与自然语言处理结合的一个小应用","authorslink":["https://www.zhihu.com/people/liuyu-43-97"],"translators":null,"translatorslink":null,"tags":["个人博客","serverless"],"keywords":"Serverless 自然语言处理","outdated":null},"wordCount":{"words":106,"sentences":34,"paragraphs":34},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-09-01-search-engine-blog.md","fields":{"slug":"/blog/2019-09-01-search-engine-blog/","keywords":["serverless","云函数","keywords","serverlesscloud","summary"]}}},{"node":{"id":"ae4fd2f8-515c-5aec-b584-38427ef33f7e","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020114/1578989800047-part-00492-780.jpg","authors":["Anycodes"],"categories":["guides-and-tutorials","user-stories"],"date":"2019-09-16T00:00:00.000Z","title":"突破传统 OJ 瓶颈，「判题姬」接入云函数","description":"通过 Serverless 实现在线编程","authorslink":["https://www.zhihu.com/people/liuyu-43-97"],"translators":null,"translatorslink":null,"tags":["在线编程","云函数"],"keywords":"Serverless 在线编程,Serverless OJ","outdated":null},"wordCount":{"words":169,"sentences":30,"paragraphs":30},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-09-16-online-Judge.md","fields":{"slug":"/blog/2019-09-16-online-Judge/","keywords":["python","serverless","云函数","代码","函数","serverless"]}}}],"totalCount":64}},"pageContext":{"isCreatedByStatefulCreatePages":false,"blogId":"b14f0796-64f5-5137-96eb-9c395a6bc3ab","previousBlogId":"07918513-5a0f-5c41-b33c-209be7389654","nextBlogId":"4c7906fb-df88-5132-96f0-3613754d9e05","categories":["user-stories"]}}}