您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

使用托管服务Use managed services

如果可能,请使用平台即为服务 (PaaS),而不是基础结构即服务 (IaaS)When possible, use platform as a service (PaaS) rather than infrastructure as a service (IaaS)

IaaS 就像有一盒零件。IaaS is like having a box of parts. 你可以构建任何东西,但必须自己组装。You can build anything, but you have to assemble it yourself. 托管服务更易于配置和管理。Managed services are easier to configure and administer. 无需提供 VM、设置 VNet、管理补丁和更新,以及与在 VM 上运行软件相关的所有其他开销。You don't need to provision VMs, set up VNets, manage patches and updates, and all of the other overhead associated with running software on a VM.

例如,假设应用程序需要一个消息队列。For example, suppose your application needs a message queue. 可以使用类似 RabbitMQ 的东西在 VM 上设置自己的消息传递服务。You could set up your own messaging service on a VM, using something like RabbitMQ. 但 Azure 服务总线已经提供了可靠的消息传递作为服务,而且它更易于设置。But Azure Service Bus already provides reliable messaging as service, and it's simpler to set up. 只需创建一个服务总线命名空间(这可以作为部署脚本的一部分来完成),然后使用客户端 SDK 调用服务总线。Just create a Service Bus namespace (which can be done as part of a deployment script) and then call Service Bus using the client SDK.

当然,应用程序可能具有某些特定要求,会使 IaaS 方法更合适。Of course, your application may have specific requirements that make an IaaS approach more suitable. 但即使应用程序基于 IaaS,也能找到可以自然合并托管服务的位置。However, even if your application is based on IaaS, look for places where it may be natural to incorporate managed services. 其中包括缓存、队列和数据存储。These include cache, queues, and data storage.

取消运行…Instead of running... 考虑使用…Consider using...
Active DirectoryActive Directory Azure Active Directory 域服务Azure Active Directory Domain Services
ElasticsearchElasticsearch Azure 搜索Azure Search
HadoopHadoop HDInsightHDInsight
IISIIS 应用服务App Service
MongoDBMongoDB Cosmos DBCosmos DB
RedisRedis Azure Redis 缓存Azure Redis Cache
SQL ServerSQL Server Azure SQL 数据库Azure SQL Database