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

Azure 应用程序体系结构指南Azure Application Architecture Guide

本指南演示用于在 Azure 上设计可缩放、可复原且高度可用的应用程序的结构化方法。This guide presents a structured approach for designing applications on Azure that are scalable, resilient, and highly available. 该方法基于我们从客户互动中掌握的成熟做法。It is based on proven practices that we have learned from customer engagements.

介绍Introduction

云正在改变应用程序的设计方式。The cloud is changing the way applications are designed. 应用程序不再是庞大的单体结构,而是会分解成较小的分散式服务。Instead of monoliths, applications are decomposed into smaller, decentralized services. 这些服务通过 API 或者使用异步消息传送或事件传送进行通信。These services communicate through APIs or by using asynchronous messaging or eventing. 根据需要添加新的实例即可实现应用程序横向扩展。Applications scale horizontally, adding new instances as demand requires.

这些趋势带来了新的挑战。These trends bring new challenges. 应用程序状态是分布式的。Application state is distributed. 操作以并行和异步方式完成。Operations are done in parallel and asynchronously. 发生故障时,整个系统必须具有复原能力。The system as a whole must be resilient when failures occur. 部署必须自动化且可预测。Deployments must be automated and predictable. 监视和遥测对于洞察系统至关重要。Monitoring and telemetry are critical for gaining insight into the system. 《Azure 应用程序体系结构指南》旨在帮助读者探索这些变革。The Azure Application Architecture Guide is designed to help you navigate these changes.

传统的本地部署Traditional on-premises现代云Modern cloud
单体集中式Monolithic, centralized
采用可预测的可伸缩性设计Design for predictable scalability
关系型数据库Relational database
强一致性Strong consistency
串行和同步处理Serial and synchronized processing
防故障设计 (MTBF)Design to avoid failures (MTBF)
偶发性大规模更新Occasional big updates
手动管理Manual management
雪花型服务器Snowflake servers
分解分散Decomposed, de-centralized
采用弹性缩放设计Design for elastic scale
Polyglot 持久性(存储技术的混合)Polyglot persistence (mix of storage technologies)
最终一致性Eventual consistency
并行和异步处理Parallel and asynchronous processing
防故障设计 (MTTR)Design for failure (MTTR)
经常性小规模更新Frequent small updates
自动自我管理Automated self-management
不可变的基础结构Immutable infrastructure

本指南面向应用程序架构师、开发人员和运营团队。This guide is intended for application architects, developers, and operations teams. 它并不是一份介绍如何使用单个 Azure 服务的操作说明指南。It's not a how-to guide for using individual Azure services. 阅读本指南后,将会了解体系结构模式,以及有关在 Azure 云平台上生成解决方案时的最佳做法。After reading this guide, you will understand the architectural patterns and best practices to apply when building on the Azure cloud platform. 也可以下载电子书版本的指南You can also download an e-book version of the guide.

本指南的结构How this guide is structured

《Azure 应用程序体系结构指南》组织成一系列步骤:从体系结构和设计到实施。The Azure Application Architecture Guide is organized as a series of steps, from the architecture and design to implementation. 每个步骤都有支持性的指导,可帮助设计应用程序体系结构。For each step, there is supporting guidance that will help you with the design of your application architecture.

架构样式Architecture styles

第一个决策点至关重要。The first decision point is the most fundamental. 要生成哪种类型的体系结构?What kind of architecture are you building? 它可能是微服务体系结构、更传统的 N 层应用程序,或大数据解决方案。It might be a microservices architecture, a more traditional N-tier application, or a big data solution. 我们已确定了多种不同的体系结构样式。We have identified several distinct architecture styles. 这些样式各有利弊。There are benefits and challenges to each.

了解更多:Learn more:

技术选择Technology choices

应该尽早在两种技术选择中做出决定,因为它们会影响整个体系结构。Two technology choices should be decided early on, because they affect the entire architecture. 这两种选择是计算服务和数据存储。These are the choice of compute service and data stores. “计算”指的是运行应用程序的计算资源的承载模型。Compute refers to the hosting model for the computing resources that your applications runs on. “数据存储”不仅包括数据库,而且还包括消息队列、缓存、日志以及应用程序可能持久存储的其他任何内容所用的存储。Data stores includes databases but also storage for message queues, caches, logs, and anything else that an application might persist to storage.

了解更多:Learn more:

设计原理Design principles

我们已确定了十条高级设计原则,遵循这些设计原则可以提高应用程序的可伸缩性、复原能力和易管理性。We have identified ten high-level design principles that will make your application more scalable, resilient, and manageable. 这些设计原则适用于任何体系结构样式。These design principles apply to any architecture styles. 在整个设计过程中,请牢记这十条高级设计原则。Throughout the design process, keep these ten high-level design principles in mind. 然后考虑一套适用于体系结构特定方面(如自动缩放、缓存、数据分区、API 设计等)的最佳做法。Then consider the set of best practices for specific aspects of the architecture, such as auto-scaling, caching, data partitioning, API design, and others.

了解更多:Learn more:

质量要点Quality pillars

成功的云应用程序将侧重于软件质量的五大要素:可伸缩性、可用性、复原能力、管理和安全性。A successful cloud application will focus on five pillars of software quality: Scalability, availability, resiliency, management, and security. 使用我们的设计评审查检表可根据这些质量要点评审体系结构。Use our design review checklists to review your architecture according to these quality pillars.