Azure 是否对应用服务数量收费 [英] Does Azure charge for number of app services

查看:19
本文介绍了Azure 是否对应用服务数量收费的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Azure 是否仅对应用服务计划资源的使用或我们在该应用服务计划下创建的应用服务数量收费?根据应用服务计划创建的应用服务数量是否会影响成本?

Does Azure charge only for the utilization of App service plan resources or for the number of app services we create under that App service plan? Does the number of app services created under a app service plan effects cost?

我正在开发一个微服务项目,我不确定是将每个微服务部署在专用应用服务中,还是将所有微服务部署在一个应用服务中作为虚拟目录.成本是我们项目的一个问题.

I am developing a microservices project and I am unsure of whether to deploy each microservice in a dedicated app service or deploying all in one app service as virtual directories. Cost is a concern for our project.

谢谢.

推荐答案

Azure 是否仅对应用服务计划资源的使用或我们在该应用服务计划下创建的应用服务数量收费?

Does Azure charge only for the utilization of App service plan resources or for the number of app services we create under that App service plan?

忽略免费和共享层,您只需为 应用服务计划(每个选定机器大小的成本 x 实例数).无论您在服务计划中有 0 个或 50 个应用程序,您都将支付相同的费用(尽管这些应用程序消耗的任何其他 I/O、存储等将是额外的).

Ignoring the Free and Shared tiers, you'll pay only for the App Service Plan (cost per selected machine size x number of instances). You'll pay the same whether you have 0 or 50 Apps on the Service plan (although any other I/O, Storage etc consumed by those Apps will be additional).

(免费层最多允许 10 个应用,而共享层最多允许 100 个应用)

(Whereas the free tier allows a max of 10 Apps, and the Shared tier allows 100 Apps)

理论上,您可以在每个应用服务计划中添加任意数量的应用服务(应用,例如 Web 应用、服务、功能应用等),但实际上您会受到限制根据您选择的 VM 大小和计划的总体资源(例如 Basic 10GB 磁盘空间,而 B1 只有 1.75GB RAM).

In theory you can then add as many App Services (apps, e.g. Web Apps, Services, Function Apps etc) as you like on each App Service Plan, however in practice you'll be limited by the overall resources of the VM size and plan you've selected (e.g. 10GB Disk space on Basic, and a B1 only has 1.75GB RAM).

来自 Microsoft docs,建议是:

在以下情况下将您的应用隔离到新的应用服务计划中:

Isolate your app into a new App Service plan when:

  • 该应用占用大量资源.
  • 您希望独立于现有计划中的其他应用扩展应用.
  • 应用需要不同地理区域的资源.

我还要补充意见:

  • 如果适用,请在应用服务计划级别或考虑在资源组或订阅级别隔离您的环境(Dev、UAT、Prod).
  • 除非您的应用最大限度地使用 CPU,同时在每个服务计划中安装尽可能多的应用是合乎逻辑的,但您可以随时监控虚拟机实例的性能和资源使用情况.
  • 在我的情况下,我通常发现 RAM 是瓶颈,因此我通常会尝试扩大到具有更多 RAM 的 VM 大小以托管更多应用,然后再分离应用并添加更多服务计划.
  • 如果您使用 .Net Core 或其他不需要 Windows 的堆栈,我建议您查看 Linux 服务计划 - 它们比 Windows 实例便宜得多.一个警告 - 目前,有一个奇怪的限制不允许混合 Windows 和 Linux 服务计划 在同一个资源组中.
  • 在服务计划实例上,每个应用在逻辑上都被很好地隔离,因此您可以添加、删除和部署应用,而不会干扰其他应用.
  • 虽然 Docker 容器可以部署为应用服务,但您可能会发现 AKS 更合适.
  • If applicable, keep your environments (Dev, UAT, Prod) isolated, either at App Service Plan level, or consider isolation at Resource Group or Subscription level.
  • Unless your apps are maxing out CPU usage, while installing as many apps per Service Plan as makes logical sense, but monitor performance and the resource usage on the VM instances as you go.
  • In my situation, I've typically found that RAM to be the bottleneck, so I would typically try to scale up to a VM size with more RAM to host more Apps before separating out the Apps and adding more Service Plans.
  • If you are on .Net Core or another stack which doesn't need Windows, I would recommend looking into the Linux Service Plans - they are considerably cheaper than Windows instances. One caveat - as at present, there's a weird limitation which doesn't allow mixing of Windows and Linux Service Plans in the same resource group.
  • Each App is logically fairly well isolated on the Service Plan instances, so you can add, delete, and deploy apps without interfering with the others.
  • Although Docker containers can be deployed as an App Service, you might find AKS a better fit.

更多细节

围绕 Azure 托管应用服务计划的术语有些混乱,但需要澄清一下:

The terminology around the Azure Managed App Service Plans is somewhat confusing, but to clarify:

  • 一个应用服务计划(服务计划)可以有 1 个或多个托管 VM 实例例如1 个服务计划扩展到 3 个实例 = 3 个虚拟机需要付费.

  • An App Service Plan (Service Plan) can have 1 or more managed VM instances e.g. 1 Service Plan scaled to 3 Instances = 3 VMs to pay for.

忽略免费/共享层(在您为每个应用程序支付的共享层上)以及隔离层,您将为每个实例支付固定的每月费用

Ignoring the Free / Shared tier (on the shared tier you pay for each App), and also ignoring the Isolated tier, you'll pay a fixed monthly cost for each Instance

您可以将多个应用添加到每个应用服务计划 - 例如Web 应用程序、功能应用程序、杂项.控制台应用程序和 Docker 映像.这些将部署到计划中的所有实例.

You can add multiple Apps to each App Service Plan - e.g. Web Apps, Function Apps, Misc. Console Apps, and Docker images. These will be deployed to all instances in the plan.

在标准层及以上,您还可以配置 部署槽 在您的应用程序上,它提供了在部署期间进行冒烟测试并提供持续正常运行时间的能力,尤其是在您的生产环境中.

On the Standard tier and above, you can also configure Deployment Slots on your Apps, which provides the ability to smoke-test and provide continued uptime during deployments, especially in your production environment.

应用服务计划 (microsoft.web/serverfarms) 约占我们每月 Azure 总成本的 40%

App Service Plans (microsoft.web/serverfarms) account for approximately 40% of our overall Monthly Azure costs

这一成本会迅速成倍增加,尤其是在您运行多个隔离环境(Dev、UAT、Prod 等)并且出于冗余或扩展原因您需要在每个环境中横向扩展至多个实例时.

This cost can quickly multiply, especially if you are running multiple isolated environments (Dev, UAT, Prod etc) and if you need to scale out to more than one instance per environment for redundancy or scale reasons.

截至撰写本文时,美国东部的指示性 VM 实例成本约为

As at time of writing, indicative VM instance costs on US East are approximately

  • Dev B1 1.75GB RAM 在 Linux 下约 15 美元/Windows 下约 50 美元
  • Prod P1V2 3.5GB RAM 大约 80 美元 Linux/大约 150 美元/下午 Windows

因此,通过将多个应用部署到单个 VM 来尝试最小化成本是很自然的,尤其是在细粒度的微服务企业或系统中.

So it's only natural to try and minimize costs by deploying multiple apps to a single VM, especially in a fine-grained Microservice enterprise or system.

这篇关于Azure 是否对应用服务数量收费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆