{"id":478949,"date":"2023-08-09T09:40:45","date_gmt":"2023-08-09T09:40:45","guid":{"rendered":""},"modified":"2023-09-05T11:17:53","modified_gmt":"2023-09-05T11:17:53","slug":"serverless","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/cn\/wiki\/serverless\/","title":{"rendered":"\u65e0\u670d\u52a1\u5668"},"content":{"rendered":"<p>\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\uff0c\u4e5f\u79f0\u4e3a\u51fd\u6570\u5373\u670d\u52a1 (FaaS)\uff0c\u662f\u4e00\u79cd\u4e91\u8ba1\u7b97\u6a21\u578b\uff0c\u5141\u8bb8\u5f00\u53d1\u4eba\u5458\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u800c\u65e0\u9700\u660e\u786e\u7ba1\u7406\u670d\u52a1\u5668\u3002\u5b83\u62bd\u8c61\u4e86\u57fa\u7840\u67b6\u6784\u7ba1\u7406\uff0c\u4f7f\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u4e13\u6ce8\u4e8e\u7f16\u5199\u4ee3\u7801\u548c\u6784\u5efa\u529f\u80fd\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u65e0\u670d\u52a1\u5668\u7684\u5386\u53f2\u3001\u5185\u90e8\u7ed3\u6784\u3001\u4e3b\u8981\u529f\u80fd\u3001\u7c7b\u578b\u3001\u7528\u4f8b\u548c\u672a\u6765\u524d\u666f\u3002\u6211\u4eec\u8fd8\u5c06\u8ba8\u8bba\u5982\u4f55\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668\u6216\u5c06\u5176\u4e0e\u65e0\u670d\u52a1\u5668\u5173\u8054\u3002<\/p>\n<h2>\u65e0\u670d\u52a1\u5668\u7684\u5386\u53f2<\/h2>\n<p>\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\u7684\u6839\u6e90\u53ef\u4ee5\u8ffd\u6eaf\u5230 21 \u4e16\u7eaa\u521d\uff0c\u5f53\u65f6\u7f51\u683c\u8ba1\u7b97\u548c\u6548\u7528\u8ba1\u7b97\u6982\u5ff5\u5960\u5b9a\u4e86\u57fa\u7840\u3002\u7136\u800c\uff0c\u5728\u4e91\u8ba1\u7b97\u7684\u80cc\u666f\u4e0b\u9996\u6b21\u63d0\u5230\u201c\u65e0\u670d\u52a1\u5668\u201d\u4e00\u8bcd\u662f\u5728 2012 \u5e74\uff0c\u5f53\u65f6 Ken Fromm \u7528\u5b83\u6765\u63cf\u8ff0\u201c\u540e\u7aef\u5373\u670d\u52a1\u201d(BaaS) \u4ea7\u54c1\u3002\u8be5\u672f\u8bed\u540e\u6765\u53d8\u5f97\u6d41\u884c\u8d77\u6765\uff0c\u5e76\u6f14\u53d8\u4e3a\u6db5\u76d6\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\u7684\u5f53\u524d\u542b\u4e49\u3002<\/p>\n<h2>\u6709\u5173\u65e0\u670d\u52a1\u5668\u7684\u8be6\u7ec6\u4fe1\u606f<\/h2>\n<p>\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\u91c7\u7528\u201c\u6309\u9700\u4ed8\u8d39\u201d\u7684\u539f\u5219\u3002\u5b83\u6d88\u9664\u4e86\u914d\u7f6e\u548c\u7ef4\u62a4\u670d\u52a1\u5668\u7684\u9700\u8981\uff0c\u56e0\u4e3a\u4e91\u63d0\u4f9b\u5546\u4f1a\u7ba1\u7406\u5e95\u5c42\u57fa\u7840\u8bbe\u65bd\u3002\u76f8\u53cd\uff0c\u5f00\u53d1\u4eba\u5458\u4f1a\u90e8\u7f72\u5355\u72ec\u7684\u51fd\u6570\u6765\u54cd\u5e94\u7279\u5b9a\u4e8b\u4ef6\u3002\u6bcf\u4e2a\u51fd\u6570\u90fd\u5728\u5176\u9694\u79bb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u4ece\u800c\u786e\u4fdd\u53ef\u6269\u5c55\u6027\u548c\u9ad8\u53ef\u7528\u6027\u3002<\/p>\n<h2>Serverless \u7684\u5185\u90e8\u7ed3\u6784<\/h2>\n<p>\u4ece\u672c\u8d28\u4e0a\u8bb2\uff0c\u65e0\u670d\u52a1\u5668\u67b6\u6784\u4f9d\u8d56\u4e8e\u4e91\u57fa\u7840\u67b6\u6784\u548c\u670d\u52a1\u3002\u5f53\u4e8b\u4ef6\u89e6\u53d1\u67d0\u4e2a\u529f\u80fd\u65f6\uff0c\u4e91\u63d0\u4f9b\u5546\u4f1a\u81ea\u52a8\u5206\u914d\u8d44\u6e90\u6765\u6267\u884c\u8be5\u529f\u80fd\u3002\u4e00\u65e6\u8be5\u529f\u80fd\u5b8c\u6210\u5176\u4efb\u52a1\uff0c\u8d44\u6e90\u5c31\u4f1a\u88ab\u91ca\u653e\u3002\u8fd9\u79cd\u6309\u9700\u8d44\u6e90\u5206\u914d\u4f7f\u65e0\u670d\u52a1\u5668\u975e\u5e38\u9ad8\u6548\u4e14\u5177\u6709\u6210\u672c\u6548\u76ca\u3002<\/p>\n<h2>Serverless \u5173\u952e\u7279\u6027\u5206\u6790<\/h2>\n<p>\u65e0\u670d\u52a1\u5668\u63d0\u4f9b\u4e86\u51e0\u4e2a\u57fa\u672c\u529f\u80fd\uff0c\u4f7f\u5176\u6210\u4e3a\u5f00\u53d1\u4eba\u5458\u7684\u4e00\u4e2a\u6709\u5438\u5f15\u529b\u7684\u9009\u62e9\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u81ea\u52a8\u7f29\u653e<\/strong>\uff1a\u65e0\u670d\u52a1\u5668\u5e73\u53f0\u6839\u636e\u4f20\u5165\u6d41\u91cf\u81ea\u52a8\u6269\u5c55\u529f\u80fd\uff0c\u786e\u4fdd\u5728\u9ad8\u9700\u6c42\u671f\u95f4\u5b9e\u73b0\u6700\u4f73\u6027\u80fd\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u4e8b\u4ef6\u9a71\u52a8<\/strong>\uff1aServerless \u4e2d\u7684\u51fd\u6570\u7531\u4e8b\u4ef6\u89e6\u53d1\uff0c\u4f8b\u5982 HTTP \u8bf7\u6c42\u3001\u6570\u636e\u5e93\u66f4\u6539\u6216\u8ba1\u5212\u95f4\u9694\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u65e0\u56fd\u7c4d<\/strong>\uff1a\u6bcf\u4e2a\u51fd\u6570\u6267\u884c\u90fd\u662f\u65e0\u72b6\u6001\u7684\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u4e0d\u4f9d\u8d56\u4e8e\u4ee5\u524d\u7684\u6267\u884c\uff0c\u4ece\u800c\u7b80\u5316\u4e86\u5f00\u53d1\u548c\u53ef\u6269\u5c55\u6027\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u51cf\u5c11\u8fd0\u8425\u5f00\u9500<\/strong>\uff1a\u901a\u8fc7\u62bd\u8c61\u670d\u52a1\u5668\u7ba1\u7406\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4e13\u6ce8\u4e8e\u4ee3\u7801\u5f00\u53d1\u548c\u529f\u80fd\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u65e0\u670d\u52a1\u5668\u7684\u7c7b\u578b<\/h2>\n<p>\u4e0d\u540c\u7684\u4e91\u670d\u52a1\u63d0\u4f9b\u5546\u63d0\u4f9b\u5404\u79cd\u65e0\u670d\u52a1\u5668\u5e73\u53f0\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6d41\u884c\u7684\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u4e91\u63d0\u4f9b\u5546<\/th>\n<th>\u670d\u52a1\u540d\u79f0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u4e9a\u9a6c\u900a\u7f51\u7edc\u670d\u52a1\uff08AWS\uff09<\/td>\n<td>AWS Lambda<\/td>\n<\/tr>\n<tr>\n<td>\u5fae\u8f6fAzure<\/td>\n<td>Azure \u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u8c37\u6b4c\u4e91\u5e73\u53f0\uff08GCP\uff09<\/td>\n<td>Google Cloud \u529f\u80fd<\/td>\n<\/tr>\n<tr>\n<td>IBM \u4e91<\/td>\n<td>IBM Cloud \u529f\u80fd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u65e0\u670d\u52a1\u5668\u7684\u4f7f\u7528\u65b9\u6cd5\u3001\u95ee\u9898\u548c\u89e3\u51b3\u65b9\u6848<\/h2>\n<p>\u65e0\u670d\u52a1\u5668\u9002\u7528\u4e8e\u5404\u79cd\u7528\u4f8b\uff0c\u5305\u62ec\uff1a<\/p>\n<ol>\n<li><strong>\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f<\/strong>\uff1a\u4e3a Web \u5e94\u7528\u7a0b\u5e8f\u6784\u5efa\u540e\u7aef API\u3002<\/li>\n<li><strong>\u5b9e\u65f6\u6570\u636e\u5904\u7406<\/strong>\uff1a\u5904\u7406\u6570\u636e\u6d41\u548c\u5904\u7406\u5b9e\u65f6\u4e8b\u4ef6\u3002<\/li>\n<li><strong>\u6279\u91cf\u5904\u7406<\/strong>\uff1a\u6267\u884c\u8ba1\u5212\u4efb\u52a1\u6216\u6279\u5904\u7406\u4f5c\u4e1a\u3002<\/li>\n<\/ol>\n<p>\u65e0\u670d\u52a1\u5668\u7684\u6311\u6218\u5305\u62ec\uff1a<\/p>\n<ol>\n<li><strong>\u51b7\u542f\u52a8\u5ef6\u8fdf<\/strong>\uff1a\u7531\u4e8e\u8d44\u6e90\u5206\u914d\uff0c\u51fd\u6570\u7684\u521d\u59cb\u8c03\u7528\u53ef\u80fd\u4f1a\u51fa\u73b0\u5ef6\u8fdf\u3002<\/li>\n<li><strong>\u4f9b\u5e94\u5546\u9501\u5b9a<\/strong>\uff1a\u5982\u679c\u5207\u6362\u63d0\u4f9b\u5546\uff0c\u4f7f\u7528\u7279\u5b9a\u4e8e\u4e91\u7684\u529f\u80fd\u53ef\u80fd\u4f1a\u5bfc\u81f4\u56f0\u96be\u3002<\/li>\n<\/ol>\n<p>\u4e3a\u4e86\u7f13\u89e3\u8fd9\u4e9b\u6311\u6218\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u91c7\u7528\u4ee5\u4e0b\u7b56\u7565\uff1a<\/p>\n<ol>\n<li><strong>\u9884\u70ed\u529f\u80fd<\/strong>\uff1a\u4fdd\u6301\u529f\u80fd\u6e29\u6696\u4ee5\u51cf\u5c11\u51b7\u542f\u52a8\u5ef6\u8fdf\u3002<\/li>\n<li><strong>\u62bd\u8c61\u5c42<\/strong>\uff1a\u4f7f\u7528\u62bd\u8c61\u5c42\u6765\u964d\u4f4e\u4f9b\u5e94\u5546\u9501\u5b9a\u98ce\u9669\u3002<\/li>\n<\/ol>\n<h2>\u4e3b\u8981\u7279\u70b9\u53ca\u6bd4\u8f83<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u5b66\u671f<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u65e0\u670d\u52a1\u5668<\/td>\n<td>\u5f00\u53d1\u4eba\u5458\u90e8\u7f72\u529f\u80fd\u800c\u4e0d\u662f\u670d\u52a1\u5668\u7684\u4e91\u8ba1\u7b97\u6a21\u578b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u4f20\u7edf\u865a\u62df\u673a<\/td>\n<td>\u4f20\u7edf\u7684\u865a\u62df\u673a\u9700\u8981\u624b\u52a8\u7ba1\u7406\u670d\u52a1\u5668\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u96c6\u88c5\u7bb1<\/td>\n<td>\u6253\u5305\u4ee3\u7801\u53ca\u5176\u4f9d\u8d56\u9879\u7684\u8f7b\u91cf\u7ea7\u3001\u53ef\u79fb\u690d\u7684\u8f6f\u4ef6\u5305\u5355\u5143\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u65e0\u670d\u52a1\u5668\u4ee5\u5176\u4e8b\u4ef6\u9a71\u52a8\u3001\u81ea\u52a8\u6269\u5c55\u548c\u5373\u7528\u5373\u4ed8\u7684\u7279\u70b9\u8131\u9896\u800c\u51fa\uff0c\u6709\u522b\u4e8e\u4f20\u7edf\u7684\u865a\u62df\u673a\u548c\u5bb9\u5668\u3002<\/p>\n<h2>\u524d\u666f\u548c\u672a\u6765\u6280\u672f<\/h2>\n<p>\u65e0\u670d\u52a1\u5668\u7684\u672a\u6765\u524d\u666f\u5149\u660e\uff0c\u5e76\u4e14\u4f1a\u4e0d\u65ad\u6539\u8fdb\u548c\u53d1\u5c55\u3002\u5173\u952e\u53d1\u5c55\u53ef\u80fd\u5305\u62ec\uff1a<\/p>\n<ol>\n<li><strong>\u6df7\u5408\u67b6\u6784<\/strong>\uff1a\u5c06\u65e0\u670d\u52a1\u5668\u4e0e\u5176\u4ed6\u4e91\u6a21\u578b\u76f8\u7ed3\u5408\uff0c\u4ee5\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li><strong>\u8fb9\u7f18\u8ba1\u7b97<\/strong>\uff1a\u5c06\u65e0\u670d\u52a1\u5668\u6269\u5c55\u5230\u8fb9\u7f18\u4ee5\u5b9e\u73b0\u4f4e\u5ef6\u8fdf\u5904\u7406\u3002<\/li>\n<\/ol>\n<p>\u968f\u7740\u65e0\u670d\u52a1\u5668\u7684\u53d1\u5c55\uff0c\u5b83\u5c06\u7ee7\u7eed\u4e3a\u5f00\u53d1\u4eba\u5458\u63d0\u4f9b\u652f\u6301\u5e76\u7b80\u5316\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u3002<\/p>\n<h2>\u4ee3\u7406\u670d\u52a1\u5668\u548c\u65e0\u670d\u52a1\u5668<\/h2>\n<p>\u4ee3\u7406\u670d\u52a1\u5668\u53ef\u4ee5\u5145\u5f53\u5ba2\u6237\u7aef\u548c\u65e0\u670d\u52a1\u5668\u529f\u80fd\u4e4b\u95f4\u7684\u4e2d\u4ecb\uff0c\u4ece\u800c\u8865\u5145\u65e0\u670d\u52a1\u5668\u67b6\u6784\u3002\u5b83\u4eec\u53ef\u4ee5\u63d0\u4f9b\u989d\u5916\u7684\u5b89\u5168\u6027\u3001\u8d1f\u8f7d\u5e73\u8861\u548c\u7f13\u5b58\u529f\u80fd\uff0c\u4ece\u800c\u589e\u5f3a\u65e0\u670d\u52a1\u5668\u5e94\u7528\u7a0b\u5e8f\u7684\u6574\u4f53\u6027\u80fd\u548c\u53ef\u9760\u6027\u3002<\/p>\n<h2>\u76f8\u5173\u94fe\u63a5<\/h2>\n<p>\u6709\u5173\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u60a8\u53ef\u4ee5\u8bbf\u95ee\u4ee5\u4e0b\u8d44\u6e90\uff1a<\/p>\n<ol>\n<li><a href=\"https:\/\/aws.amazon.com\/lambda\/\" target=\"_new\" rel=\"noopener nofollow\">AWS Lambda \u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/\" target=\"_new\" rel=\"noopener nofollow\">Microsoft Azure \u51fd\u6570\u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/cloud.google.com\/functions\" target=\"_new\" rel=\"noopener nofollow\">Google Cloud \u529f\u80fd\u6587\u6863<\/a><\/li>\n<li><a href=\"https:\/\/cloud.ibm.com\/functions\/\" target=\"_new\" rel=\"noopener nofollow\">IBM Cloud Functions \u6587\u6863<\/a><\/li>\n<\/ol>\n<p>\u603b\u4e4b\uff0c\u65e0\u670d\u52a1\u5668\u8ba1\u7b97\u901a\u8fc7\u63d0\u4f9b\u53ef\u6269\u5c55\u3001\u7ecf\u6d4e\u9ad8\u6548\u4e14\u5f00\u53d1\u4eba\u5458\u53cb\u597d\u7684\u65b9\u6cd5\u5f7b\u5e95\u6539\u53d8\u4e86\u4e91\u5f00\u53d1\u3002\u968f\u7740\u8fd9\u9879\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u5b83\u4e3a\u4e91\u8ba1\u7b97\u548c\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u7684\u672a\u6765\u5e26\u6765\u4e86\u5de8\u5927\u7684\u5e0c\u671b\u3002\u901a\u8fc7\u5229\u7528\u65e0\u670d\u52a1\u5668\u7684\u4f18\u52bf\u5e76\u96c6\u6210\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u4f01\u4e1a\u53ef\u4ee5\u6784\u5efa\u5f3a\u5927\u800c\u9ad8\u6548\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u6ee1\u8db3\u73b0\u4ee3\u8ba1\u7b97\u7684\u9700\u6c42\u3002<\/p>","protected":false},"featured_media":470480,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-478949","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Serverless: An Overview<\/mark>","faq_items":[{"question":"What is Serverless computing?","answer":"<p>Serverless computing is a cloud computing model that allows developers to run applications without managing servers directly. It abstracts the infrastructure management, enabling developers to focus solely on writing code and building functionalities. Each function runs in its isolated environment, and the cloud provider automatically allocates resources when a function is triggered by specific events.<\/p>"},{"question":"How did Serverless computing originate?","answer":"<p>The concept of Serverless computing can be traced back to the early 2000s, with the foundation laid by grid computing and utility computing. The term \"Serverless\" in the context of cloud computing was first mentioned in 2012, describing \"Backend-as-a-Service\" (BaaS) offerings. It later evolved to encompass the current meaning of serverless computing.<\/p>"},{"question":"What are the key features of Serverless?","answer":"<p>Serverless computing offers several essential features, including auto-scaling, event-driven execution, stateless functions, and reduced operational overhead. Auto-scaling ensures optimal performance during high traffic, event-driven execution allows functions to respond to specific triggers, and stateless functions simplify development and scalability.<\/p>"},{"question":"What types of Serverless platforms exist?","answer":"<p>There are various Serverless platforms provided by different cloud service providers, such as AWS Lambda, Microsoft Azure Functions, Google Cloud Functions, and IBM Cloud Functions.<\/p>"},{"question":"How can Serverless be used?","answer":"<p>Serverless computing is suitable for various use cases, including building backend APIs for web applications, real-time data processing, and executing scheduled tasks or batch processing jobs.<\/p>"},{"question":"What are the challenges with Serverless?","answer":"<p>Serverless has some challenges, such as cold start latency during the initial invocation of functions and potential vendor lock-in when using cloud-specific features.<\/p>"},{"question":"How can the challenges be mitigated?","answer":"<p>To mitigate challenges, developers can employ strategies like keeping functions warm to reduce cold start latency and using abstraction layers to reduce vendor lock-in risks.<\/p>"},{"question":"How does Serverless compare to traditional VMs and containers?","answer":"<p>Serverless computing differs from traditional VMs and containers as it focuses on functions rather than managing servers. It stands out with its event-driven, auto-scaling, and pay-as-you-go characteristics.<\/p>"},{"question":"What are the future prospects of Serverless?","answer":"<p>The future of Serverless looks promising with continuous improvements and advancements. Key developments may include hybrid architectures and extending Serverless to the edge for low-latency processing.<\/p>"},{"question":"How can proxy servers be associated with Serverless?","answer":"<p>Proxy servers can complement Serverless architectures by acting as intermediaries between clients and Serverless functions. They provide additional security, load balancing, and caching functionalities, enhancing overall performance and reliability.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/478949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/478949\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media\/470480"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media?parent=478949"}],"curies":[{"name":"\u53ef\u6e7f\u6027\u7c89\u5242","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}