我想通过选择 aws-lambda、azure function 或 google cloud function 来开发一个 serverless 项目。然后我想比较每一个,以便为我的项目选择最好的一个。
我需要为我的项目选择最稳定的无服务器技术。
有没有比较这些技术的材料?
这些无服务器技术是否有任何受支持的框架?
我想通过选择 aws-lambda、azure function 或 google cloud function 来开发一个 serverless 项目。然后我想比较每一个,以便为我的项目选择最好的一个。
我需要为我的项目选择最稳定的无服务器技术。
有没有比较这些技术的材料?
这些无服务器技术是否有任何受支持的框架?
支持的语言
AWS lambda - Node.js、Python、Java、C#(.net 核心)
Azure Function - Node.js、Python、PHP、F#、C#、batch、bash
Google Cloud Functions Node.js
每个请求的最长执行时间
AWS lambda - 300 秒(5 分钟)
Azure Function - 300 秒(5 分钟)
Google Cloud Functions 540 秒(9 分钟)
日志管理
AWS lambda - Cloud watch
Azure Function - Azure Storage
Google Cloud Functions Cloud Logging
HTTP 端点
AWS lambda - AWS API 网关
Azure 函数-HTTP 触发器
Google Cloud Functions HTTP 触发器
定价
说明:这些是每次通话费用。CPU 和 RAM 时间收费很常见,通常超过每次通话费用,应予以考虑。
AWS lambda - 0.20 美元/10 万次执行
Azure 函数- 0.20 美元/10 万次执行
Google Cloud Functions 0.40 美元/M 执行,HTTP 调用没有额外费用定价细节
功能限制
AWS lambda - 无限功能
Azure Function - 无限功能
Google Cloud Functions每个项目 1,000
并发执行
AWS lambda每个区域每个账户 -100 次并行执行,但用户可以增加它
Azure Function - 无限制
Google Cloud Functions HTTP 无限制,1,000 非 HTTP
欢迎大家更正信息并添加新信息。
AWS Lambda vs Azure Functions vs Google Cloud Functions
这是不同云供应商提供的所有无服务器功能的汇总。这是基于我的观点。
如果在一段时间内发生了任何变化,或者您想添加任何新内容,请随时发表评论并让我们维护它以跟踪各种功能。
+-----------------+---------------------+-----------------------+-------------------+
| Category | AWS Lambda | Azure | Google Cloud |
| | | Functions | Functions |
+-----------------+---------------------+-----------------------+-------------------+
| 1. Version | Production ready | Preview - Beta | Closed Alpha |
+-----------------+---------------------+-----------------------+-------------------+
| 2. Supported | Nodejs, Python, | Nodejs, Python, | Javascript |
| Languages | Java | PHP, F#, C# | |
+-----------------+---------------------+-----------------------+-------------------+
| 3. Dependency | Compile all | Using | Using |
| Management | external packages | package.json – nodejs | package.json |
| | and zip the | project.json – F#,C# | |
| | source code | | |
+-----------------+---------------------+-----------------------+-------------------+
| | S3, DynamoDB | Bindings/Triggers | HTTP |
| | Kinesis | | functions: |
| | Streams | Scheduler | Http Triggers |
| | SNS, SES | Http(webhook) | Webhooks (drive, |
| | Cognito | Azure Storage | gmail, calendar) |
| | Cloud Formation | Events Hubs | |
| 4. Event | Cloud Watch | Queues, Tables | Background |
| Sources | Code Commit | DocumentDB(No-sql) | functions: |
| | Scheduled Events | Notification Hub | Cloud Pub/Sub, |
| | Config | Twilio | Cloud Storage |
| | Echo, | | |
| | Alexa | | Pub/Sub: |
| | APIGateway | | Cloud Logging |
| | | | Gmail, Twilio |
+-----------------+---------------------+-----------------------+-------------------+
| 5. Granular | IAM | | |
| IAM | policy | Not Yet | Not Yet |
| | can be Attached | | |
| | to Lambda. | | |
+-----------------+---------------------+-----------------------+-------------------+
| | - On top of Linux | - On top of Windows | |
| 6. Architecture | - Memory allocated | - Memory allocated | |
| | per function. | per app service. | Not Specified |
+-----------------+---------------------+-----------------------+-------------------+
| | No persistent | Env variables | |
| | storage. | can be set in | |
| 7. Persistent | Completely | App services | Not Specified |
| Storage | Stateless | which can be used | |
| | | in functions. | |
+-----------------+---------------------+-----------------------+-------------------+
| 8. HTTP | APIGateway | HTTP webhooks | HTTP Trigger |
| Endpoint | | | |
+-----------------+---------------------+-----------------------+-------------------+
| 9. Log | Cloud | Kudu Console | Stackdriver |
| Management | watch | | Logging |
+-----------------+---------------------+-----------------------+-------------------+
| 10. Maximum | 300 seconds | No limit | No limit |
| Execution | (5 mins) | | |
| Time | | | |
| per request | | | |
+-----------------+---------------------+-----------------------+-------------------+
| 11. Concurrent | 100 | 10 instances | Not Specified |
| Executions | parallel | which is several | |
| | Executions, but | 100 executions | |
| | Can be increased | | |
+-----------------+---------------------+-----------------------+-------------------+
| 12. Deployment | Zip upload | Git, dropbox, | Zip upload, |
| | to Lambda/s3, | visual studio, | Cloud Storage, |
| | Serverless | One drive, | Cloud Source |
| | Framework | Kudu Console | repositories, |
| | | | Git |
+-----------------+---------------------+-----------------------+-------------------+
| 13. Maximum | | | 20 functions |
| no. of | No limit | Not Specified | per project |
| Functions | | | |
+-----------------+---------------------+-----------------------+-------------------+
| 14. Pricing | Request Charges: | Request Charges: | Unknown until |
| | $0.20 / 1M requests | $0.20 / 1M requests | Open beta |
| | | | |
| | Compute Charges: | Compute Charges: | |
| | $0.00001667 / GB-s | $0.000008 / GB-s | |
+-----------------+---------------------+-----------------------+-------------------+
几处更新(2017 年 2 月 18 日):
现在有一个无服务器框架,它支持与云提供商无关的代码,并为使用抽象开发、测试和部署您的功能提供统一的体验。
它支持所有 3 个提供程序,但并非支持所有语言。最小的共同点是 Node.js/JavaScript