{"id":2644,"date":"2019-06-01T11:37:30","date_gmt":"2019-06-01T03:37:30","guid":{"rendered":"https:\/\/www.mudone.com\/?p=2644"},"modified":"2019-06-01T16:26:22","modified_gmt":"2019-06-01T08:26:22","slug":"a-byte-of-serverless","status":"publish","type":"post","link":"https:\/\/www.mudone.com\/?p=2644","title":{"rendered":"A Byte of Serverless"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6700\u8fd11\u4e2a\u6708\u4e1a\u4f59\u65f6\u95f4\u5728\u73a9Serverless\u591a\u4e00\u70b9\uff0c\u8fd9\u91cc\u505a\u4e00\u4e0b\u8bb0\u5f55\u3002<br><br>\u73b0\u5728\u7684\u670d\u52a1\u5f00\u53d1\u8d8b\u52bf\u57fa\u672c\u6cbf\u7740\u8fd9\u6837\u7684\u8def\u5f84\u5728\u53d1\u5c55\uff1a<br>\u670d\u52a1\u5316(SOA) -> \u5fae\u670d\u52a1(Microservices) -> \u670d\u52a1\u7f51\u683c(Service Mesh) -> Function Service (Serverless)<br>\u770b\u4e0b\u9762\u7684\u56fe\u7247\u4f1a\u66f4\u76f4\u89c2\u4e00\u4e9b\uff08\u6587\u672b\u4f1a\u9644\u5e26\u4e00\u4e9b\u9605\u8bfb\u8d44\u6e90\uff0c\u5185\u5bb9\u66f4\u5b8c\u5584\uff09\uff1a<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"359\" src=\"https:\/\/www.mudone.com\/wp-content\/uploads\/2019\/06\/mono-ms-sls.jpg\" alt=\"\" class=\"wp-image-2646\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><br>Serverless\u76f4\u63a5\u4ece\u5b57\u9762\u53ef\u4ee5\u770b\u51fa\u6765\uff0c\u670d\u52a1\u5f00\u53d1\u8005\u65e0\u9700\u5173\u5fc3\u670d\u52a1\u5668\u8fd0\u7ef4\uff0c\u53ea\u9700\u8981\u505a\u597d\u670d\u52a1\u529f\u80fd\u5f00\u53d1\uff0c\u9ad8\u53ef\u7528\u3001\u670d\u52a1\u5bb9\u91cf\u6269\u5c55\u90fd\u65e0\u9700\u5173\u5fc3\uff0c\u5927\u5927\u964d\u4f4e\u5f00\u53d1\u8005\u7684\u8d1f\u62c5\u3002<br><br>\u628a\u4e00\u4e2a\u4e2a\u670d\u52a1\u4ee5\u51fd\u6570\u7684\u65b9\u5f0f\u66b4\u9732\u51fa\u6765\u3002<br>\u524d\u53f0\u7684\u5e94\u7528\u62fc\u88c5\u8c03\u7528\u51fd\u6570\u5b9e\u73b0\u670d\u52a1\u3002<br><br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5382\u5546<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u57fa\u672c\u4e0a\u4e3b\u6d41\u7684\u4e91\u670d\u52a1\u90fd\u63d0\u4f9b\u4e86Serverless\u670d\u52a1\uff0c\u8fd9\u91cc\u8bf4\u4e00\u4e0b\u6211\u5b9e\u9645\u64cd\u4f5c\u8fc7\u7684\u51e0\u5bb6\u3002<br><br>\u56fd\u5185\u5382\u5546\uff1a<br>1\u3001<a href=\"https:\/\/www.aliyun.com\/product\/fc\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">\u963f\u91cc\u4e91 \u51fd\u6570\u8ba1\u7b97FC<\/a><br>2\u3001<a href=\"https:\/\/cloud.tencent.com\/product\/scf\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">\u817e\u8baf\u4e91 \u65e0\u670d\u52a1\u5668\u4e91\u51fd\u6570SCF<\/a><br><br>\u56fd\u9645\u5382\u5546\uff1a<br>1\u3001<a href=\"https:\/\/aws.amazon.com\/lambda\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Amazon AWS Lambda<\/a><br>2\u3001<a href=\"https:\/\/cloud.google.com\/functions\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Google Cloud Functions<\/a><br>3\u3001<a href=\"https:\/\/cloud.google.com\/run\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Google Cloud Run<\/a><br><br>\u72ec\u7acbServerless\u63d0\u4f9b\u5546<br>1\u3001<a href=\"https:\/\/zeit.co\/now\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">now.sh \/ zeit.co<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8bed\u8a00\u652f\u6301<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PHP\uff1a\u963f\u91cc\u4e91\u3001\u817e\u8baf\u4e91\u3001zeit.co<br>Python\uff1a\u5168\u652f\u6301<br>Nodejs\uff1a\u5168\u652f\u6301<br>Java\uff1a\u5168\u652f\u6301<br>Go\uff1aGoogle Cloud\u3001zeit.co<br>\u5176\u4ed6\u8fd8\u6709\u4e00\u4e9b\u8bed\u8a00\u652f\u6301\u8fd9\u91cc\u4e0d\u5c55\u5f00\u8bf4\u660e\u3002<br>\u4e4b\u524dServerless\u7684\u4e00\u4e2a\u95ee\u9898\u5c31\u662f\u8bed\u8a00\u7248\u672c\u76f8\u5bf9\u6bd4\u8f83\u6ede\u540e\uff0c\u4f46\u5c31\u76ee\u524d\u770b\u4e0b\u6765\uff0c\u4e3b\u6d41\u670d\u52a1\u5546\u57fa\u672c\u90fd\u53ef\u4ee5\u7528\u5230\u8f83\u65b0\u7684\u7248\u672c\uff0c\u6bd4\u5982Python 3.6\uff0cNodejs 10.x \u7b49\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5f00\u53d1\u5de5\u5177\u5305<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Serverless\u73b0\u9636\u6bb5\u7684\u4e00\u4e2a\u95ee\u9898\u5c31\u662f\u8ddf\u5382\u5546\u7684\u4e91\u670d\u52a1\u5f3a\u7ed1\u5b9a\uff0c\u5982\u679c\u8bf4\u662f\u4f60\u7684\u670d\u52a1\u662f\u57fa\u4e8eAWS\u6765\u6784\u5efa\uff0c\u90a3\u540e\u9762\u60f3\u8981\u8fc1\u79fb\u5230\u5176\u4ed6\u4e91\u670d\u52a1\u5e76\u4e0d\u662f\u4ef6\u5bb9\u6613\u7684\u4e8b\u60c5\uff0c\u9700\u8981\u6539\u9020\u4f60\u7684\u5e94\u7528\u4ee3\u7801\u8c03\u7528\u65b0\u7684\u5382\u5546\u7684\u540e\u7aef\u670d\u52a1\u3002\u4f46\u4ee3\u7801\u57fa\u672c\u7684\u8fd0\u884c\u73af\u5883\u662f\u4e00\u6837\u7684\uff0c\u8fd9\u4e2a\u4e0d\u7528\u62c5\u5fc3\u3002<br>\u5bf9\u4e8e\u670d\u52a1\u4f9d\u8d56\u7684\u95ee\u9898\uff1a<br>1\u3001\u6709\u4e2a\u57fa\u4e8e<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/serverless.com\/framework\/\" target=\"_blank\">Nodejs\u7684Serverless\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6<\/a>\uff0c\u5bf9\u4e0a\u5c42\u5e94\u7528\u5c42\u62bd\u8c61\uff0c\u4e0b\u5c42\u628a\u4e91\u670d\u52a1\u8fdb\u884c\u5c01\u88c5\uff0c\u9002\u914d\u4e0d\u540c\u7684\u4e91\u5382\u5546\uff08\u76ee\u524d\u652f\u63018\u5bb6\uff09\uff1b<br>\u5bf9\u4e8e\u73af\u5883\u4f9d\u8d56\u7684\u95ee\u9898\uff1a<br>1\u3001\u4eca\u5e74\u53d1\u5e03\u7684Google Cloud Run\u91c7\u7528\u7684\u65b9\u6848\u662f\u90e8\u7f72Docker\u955c\u50cf\uff0c\u8fd9\u79cd\u501f\u52a9\u4e86Docker\u6765\u89e3\u51b3\u73af\u5883\u9002\u914d\u7684\u95ee\u9898\u3002<br><br>Serverless\u670d\u52a1\u5f00\u53d1\u6211\u81ea\u5df1\u662f\u4e3b\u8981\u4f7f\u7528\u4e86Python 3.6\uff0c\u4e0b\u9762\u5217\u4e3e\u4e00\u4e0b\u76f8\u5173\u5de5\u5177\u5305\uff1a<br>1\u3001<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/github.com\/Miserlou\/Zappa\" target=\"_blank\">https:\/\/github.com\/Miserlou\/Zappa<\/a> AWS Lambda\u90e8\u7f72\u5de5\u5177<br>      \u6211\u5199\u7684\u5c0f\u670d\u52a1\u662f\u90e8\u7f72\u5728AWS Lambda\uff0c\u6240\u4ee5\u6211\u5bf9Zappa\u6709\u5b9e\u8df5\u7ecf\u9a8c\uff0c\u4e0b\u9762\u4e24\u4e2a\u6728\u6709\u3002<br>2\u3001<a href=\"https:\/\/github.com\/serverlessplus\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/github.com\/serverlessplus<\/a> \u817e\u8baf\u4e91<br>3\u3001<a href=\"https:\/\/github.com\/aliyun\/fun\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/github.com\/aliyun\/fun<\/a> \u963f\u91cc\u4e91<a href=\"https:\/\/github.com\/serverlessplus\"><\/a><a href=\"https:\/\/github.com\/aliyun\/fun\"><br><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">now.sh \/ zeit.co<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7279\u522b\u5355\u72ec\u8bf4\u8bf4\u4e00\u4e0b\u8fd9\u5bb6\u72ec\u7acb\u5382\u5546\uff0c\u7ed3\u5408\u4e86github\u7684\u73a9\u6cd5\u6bd4\u8f83\u6709\u8da3\uff0c\u6388\u6743github\u4e4b\u540e\uff0cpush\u4ee3\u7801\u5230github\u7684\u4ed3\u5e93\uff0c\u4f1a\u81ea\u52a8\u90e8\u7f72\u4ee3\u7801\u5230zeit\u670d\u52a1\u5668\uff0c\u63a8\u8350\u5927\u5bb6\u73a9\u4e00\u4e0b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5176\u4ed6<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5173\u4e8e\u670d\u52a1\u8ba1\u8d39\uff1aServerless\u771f\u6b63\u5b9e\u73b0\u4e86\u201c\u6309\u9700\u4ed8\u8d39\u201d\uff0c\u5e94\u7528\u7a0b\u5e8f\u89e6\u53d1\u6267\u884c\u7684\u65f6\u5019\u624d\u8ba1\u8d39\u3002\u5bf9\u6bd4\u76ee\u524d\u7684\u4e91\u670d\u52a1\u5668\uff0c\u5373\u4f7f\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u65e0\u4eba\u8bbf\u95ee\uff0c\u4e5f\u9700\u8981\u652f\u4ed8\u6258\u7ba1\u8d39\u7528\uff0c\u8fd9\u70b9\u4e0aServerless\u4f18\u52bf\u5f88\u5927\u3002<br>\u5173\u4e8e\u670d\u52a1\u6269\u5bb9\uff1a\u65e0\u9700\u5173\u5fc3\u3002<br>\u51b7\u542f\u52a8\u95ee\u9898\uff1aServerless\u7531\u4e8e\u4e0d\u662f\u5e38\u9a7b\u670d\u52a1\uff0c\u5982\u670d\u52a1\u6ca1\u6709\u9884\u70ed\uff0c\u51b7\u542f\u52a8\u7684\u65f6\u5019\u54cd\u5e94\u901f\u5ea6\u4f1a\u7a0d\u6162\uff080.x\u79d2\uff09\uff0c\u6240\u4ee5\u8fd9\u91cc\u5e38\u89c1\u7684\u65b9\u6848\u662f\u8bbe\u7f6e\u4e00\u4e2a\u5b9a\u65f6\u89e6\u53d1\u5668\u5c06\u5e94\u7528\u7a0b\u5e8fwarmup\uff0c\u7f13\u89e3\u51b7\u542f\u52a8\u901f\u5ea6\u6162\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><br>\u6211\u5f00\u53d1\u7684\u5c0f\u670d\u52a1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ProgressBar\uff08\u8fdb\u5ea6\u6761\uff09\uff1a<a href=\"https:\/\/progressbar.net\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/progressbar.net\/<\/a> <br>\u529f\u80fd\u662f\u8ba1\u7b97\u5f53\u524d\u65f6\u523b\u5e74\u6708\u65e5\u7684\u767e\u5206\u6bd4\u8fdb\u5ea6\u3002<br>\u662f\u5076\u7136\u7684\u4e00\u4e2a\u673a\u4f1a\u5728Twitter\u770b\u5230\u4e00\u4e2a\u53f7\uff1a<a href=\"https:\/\/twitter.com\/ProgressBar201X\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/twitter.com\/ProgressBar201X<\/a> \u5f97\u5230\u542f\u53d1\uff0c\u4e8e\u662f\u505a\u4e86\u8fd9\u6837\u7684\u4e00\u4e2a\u5c0f\u670d\u52a1\u3002<br>\u57fa\u4e8ePython 3.6\u5f00\u53d1\uff0c\u5f00\u53d1\u6846\u67b6\u662fFlask\uff0c\u4f7f\u7528Zappa\u90e8\u7f72\u5728Amazon AWS Lambda\u91cc\u3002<br>====<br>\u673a\u5668\u4eba\u63d0\u9192\uff1a\u8fd9\u4e2a\u662f\u5de5\u4f5c\u4e0a\u7684\u5c0f\u5de5\u5177\uff0c\u5bf9\u63a5\u4e86\u4f01\u4e1a\u5fae\u4fe1\u7684\u7fa4\u673a\u5668\u4eba\u63a5\u53e3\uff0c\u53d1\u7fa4\u6d88\u606f\u3002\u4f7f\u7528\u7684\u662fPHP\u5f00\u53d1\uff0c\u7528\u7684\u662f\u963f\u91cc\u4e91\u51fd\u6570\u8ba1\u7b97\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5c3e\u58f0<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u8fd1Python\u3001Nodejs\u90fd\u7528\u4e86\u4e0d\u5c11\uff0c\u51e0\u79cd\u8bed\u8a00\u6362\u7740\u5199\u7684\u6709\u70b9\u7cbe\u795e\u5206\u88c2\u4e86\uff1aP<br><br>\u65b0\u7684\u73a9\u5177\uff1a\u4e4b\u524d\u4e00\u76f4\u8ba1\u5212\u5f04\u4e2a\u8f6f\u8def\u7531\u6765\u7740\uff0c\u4f46NUC\u53ea\u6709\u5355\u4e2a\u7f51\u53e3\u3002\u6628\u5929\u4e70\u4e86\u4e00\u4e2aUSB\u7684\u5343\u5146\u7f51\u5361\uff0c\u540e\u9762\u6253\u7b97\u628aNUC\u914d\u7f6e\u4e00\u4e0b\u8def\u7531\u529f\u80fd\uff0c\u8fd9\u6837NUC\u5c31\u771f\u7684\u53d8\u4e3a\uff1a<br>\u8def\u7531\u3001\u5b58\u50a8\u3001\u5f71\u97f3\u64ad\u653e\u4e00\u4f53\u5316\u7684\u7ec8\u6781\u8bbe\u5907\u4e86\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u9605\u8bfb\u8d44\u6e90<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/serverless.ink\/\" target=\"_blank\">https:\/\/serverless.ink\/<\/a><br><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"http:\/\/jolestar.com\/serverless-faas-current-status-and-future\/\" target=\"_blank\">http:\/\/jolestar.com\/serverless-faas-current-status-and-future\/<\/a><br><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/amio.github.io\/serverless-zhcn\/\" target=\"_blank\">https:\/\/amio.github.io\/serverless-zhcn\/<\/a><br><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/jimmysong.io\/posts\/what-is-serverless\/\" target=\"_blank\">https:\/\/jimmysong.io\/posts\/what-is-serverless\/<\/a><br><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/martinfowler.com\/articles\/serverless.html\" target=\"_blank\">https:\/\/martinfowler.com\/articles\/serverless.html<\/a><br><a href=\"https:\/\/aws.amazon.com\/cn\/blogs\/china\/iaas-faas-serverless\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/aws.amazon.com\/cn\/blogs\/china\/iaas-faas-serverless\/<\/a><br><a href=\"https:\/\/aws.amazon.com\/cn\/blogs\/china\/lambda-serverless\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/aws.amazon.com\/cn\/blogs\/china\/lambda-serverless\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd11\u4e2a\u6708\u4e1a\u4f59\u65f6\u95f4\u5728\u73a9Serverless\u591a\u4e00\u70b9\uff0c\u8fd9\u91cc\u505a\u4e00\u4e0b\u8bb0\u5f55\u3002 \u73b0\u5728\u7684\u670d\u52a1\u5f00\u53d1\u8d8b\u52bf\u57fa\u672c\u6cbf\u7740\u8fd9\u6837\u7684\u8def\u5f84\u5728\u53d1\u5c55 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-2644","post","type-post","status-publish","format-standard","hentry","category-technote"],"_links":{"self":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts\/2644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2644"}],"version-history":[{"count":33,"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts\/2644\/revisions"}],"predecessor-version":[{"id":2679,"href":"https:\/\/www.mudone.com\/index.php?rest_route=\/wp\/v2\/posts\/2644\/revisions\/2679"}],"wp:attachment":[{"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mudone.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}