【问题标题】:Compare AWS-lambda, Azure functions and Google Cloud Function比较 AWS-lambda、Azure 函数和谷歌云函数
【发布时间】:2017-03-12 14:04:01
【问题描述】:

我想通过选择 aws-lambda、azure function 或 google cloud function 来开发一个无服务器项目。然后我想比较每一个,以便为我的项目选择最好的。

我需要为我的项目选择最稳定的无服务器技术。

有没有比较这些技术的资料?

这些无服务器技术是否有任何受支持的框架?

【问题讨论】:

    标签: azure aws-lambda azure-functions google-cloud-functions


    【解决方案1】:

    比较 AWS-Lambda、Azure Functions 和 Google Cloud Functions

    1. 支持的语言
      AWS lambda- Node.js、Python、Java、C#(.net 核心)
      Azure 函数 - Node.js、Python、PHP、F#、C#、批处理、bash
      谷歌云函数 Node.js

    2. 每个请求的最长执行时间
      AWS lambda- 300 秒(5 分钟)
      Azure 函数 - 300 秒(5 分钟)
      Google Cloud Functions 540 秒(9 分钟)

    3. 日志管理
      AWS lambda- 云手表
      Azure 函数 - Azure 存储
      Google Cloud 函数 Cloud Logging

    4. 可扩展性和可用性
      AWS lambda- 自动扩展
      Azure 函数 - 自动扩展
      Google Cloud Functions 自动缩放
    5. HTTP 端点
      AWS lambda- AWS API 网关
      Azure 函数 -HTTP 触发器
      Google Cloud 函数 HTTP 触发器

    6. 定价
      注意:这些是每次通话费用。 CPU 和 RAM 时间收费很常见,通常超过每次通话费用,应予以考虑。
      AWS lambda-$0.20/1M 执行
      Azure Function-$0.20/1M 执行
      Google Cloud Functions$0.40/M执行,HTTP 调用没有额外的pricing details

    7. 功能限制
      AWS lambda-无限功能
      Azure 功能-无限功能
      Google Cloud Functions 每个项目 1,000 个

    8. 并发执行次数
      AWS lambda-100 个并行执行次数,每个区域每个账户,但用户可以增加它
      Azure 函数 strong> - 无限制
      Google Cloud Functions HTTP 无限制,1000 个非 HTTP

    9. 部署
      AWS lambda-Zip、AWS-S3 或内联编辑代码
      Azure 函数-Azure WebApp 可以处理的任何事情: FTP(S)、KUDU、Web Deploy、One Drive\DropBox、Git\Local Git\TFS\etc、Visual Studio\XCode\Eclipse\etc、PowerShell\Cli\可能所有 SDK 的
      Google Cloud Functions CLI、ZIP 上传、内联网络编辑器、云存储或云源代码库

    欢迎大家更正信息并添加新信息。

    【讨论】:

    • AWS Lambda 是唯一一个不在预览版、beta 版或 alpha 版中的产品。
    • @hellomichibye 不预览是什么意思?
    • 这意味着 Lambda 是自两年前推出以来唯一一个 GA 和产品就绪的产品,而其他产品于今年(2016 年)推出。
    • Lambda 中每个账户每个区域的 100 次并行执行是一个软限制。你可以增加它。
    • "Node.js、Python、PHP、F#、C#、batch、bash" - 我注册了免费的 azure 帐户来测试 PHP,但其中一半的语言甚至都不存在。有像 js、f 和 c 或 wehatever 之类的。不记得了。
    【解决方案2】:

    现在有一个无服务器框架,它支持与云提供商无关的代码,并为使用抽象开发、测试和部署您的函数提供统一的体验。

    看看https://serverless.com

    它支持所有 3 个提供程序,但并非支持所有语言。最小的共同点是 Node.js/JavaScript

    【讨论】:

      【解决方案3】:

      一些更新(2017 年 2 月 18 日):

      • Azure Function 已于 2016 年 11 月正式发布
      • AWS 支持 C#,但仅支持 .NET Core
      • 您最多可以拥有 100 个 Azure 函数应用,每个应用可以包含许多函数
      • Azure 函数消耗层当前每个函数调用的最大运行时间为 300 秒
      • Azure 函数计算价格在 GA 时已从 0.000008 美元/GB-s 更新为 0.00001667 美元/GB-s

      【讨论】:

        【解决方案4】:

        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      |                   |
        +-----------------+---------------------+-----------------------+-------------------+
        

        【讨论】:

        • 精心编译的信息。旁注:您是如何生成这种漂亮的表格格式的?
        • @Angle.Bracket 这是生成 github 自述文件的链接。 tablesgenerator.com/text_tables
        • 您能否根据 2016 年 11 月以来发生的一切更新您的答案?这会很有帮助。
        • 如果我错了,请有人纠正我,但 Azure 不再局限于每个项目 20 个函数。 (我刚做了 21 次。)
        • 请注意,如果您想通过 HTTP(s) 触发函数,Amazon Lambda 要求您使用其网关服务。它的价格为每百万个请求额外 3.50 美元,因此成本很高。
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-11-21
        • 1970-01-01
        • 2019-02-15
        • 2018-12-07
        • 2018-10-02
        相关资源
        最近更新 更多