我想通过选择aws-lambda,azure函数或google云函数来开发无服务器项目,然后我想比较每个项目以便为我的项目选择更好的项目。
我需要为我的项目要求选择最稳定的无服务器技术。 这些技术比较有什么材料吗? 这些无服务器技术是否有任何受支持的框架?
答案 0 :(得分:55)
支持的语言
AWS lambda - Node.js,Python,Java,C#(。net core)
Azure功能 - Node.js,Python,PHP,F#,C#,批处理,bash
Google Cloud Functions Node.js
每次请求的最长执行时间
AWS lambda - 300秒(5分钟)
Azure功能 - 300秒(5分钟)
Google Cloud功能 540秒(9分钟)
日志管理
AWS lambda - Cloud watch
Azure功能 - Azure存储
Google云端功能云端记录
HTTP终点
AWS lambda - AWS API网关
Azure功能 -HTTP触发器
Google Cloud Functions HTTP触发器
<强>定价强>
注意:这些是每次通话费用。为CPU和RAM时间充电很常见,通常超过每次通话费用,应予以考虑。
AWS lambda - $ 0.20 / 1M执行次数
Azure功能 - $ 0.20 / 1M执行次数
Google云端功能 $ 0.40 / M执行,HTTP呼叫无需额外pricing details
功能限制
AWS lambda - 无限功能
Azure功能 - 无限功能
Google Cloud Functions 每个项目1,000个
同时执行
每个区域每个帐户 AWS lambda -100个并行执行但用户可以增加它
Azure功能 - 无限制
Google Cloud Functions HTTP无限制,1,000非HTTP
每个人都欢迎更正信息并添加新信息。
答案 1 :(得分:26)
AWS Lambda vs Azure功能与Google Cloud功能
以下是不同云供应商提供的所有无服务器功能的集合。这是基于我的观点。
如果在一段时间内发生了任何变化,或者您想要添加任何内容 新的,请随时评论,并让我们保持跟踪 各种功能。
+-----------------+---------------------+-----------------------+-------------------+
| 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 | |
+-----------------+---------------------+-----------------------+-------------------+
答案 2 :(得分:2)
很少有更新(2017年2月18日):
答案 3 :(得分:2)
现在有一个无服务器框架,支持云提供商不可知代码,并提供使用抽象开发,测试和部署功能的统一体验。
它支持所有3个提供商,但并非所有语言都受支持。最小的共同点是Node.js / JavaScript