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

专为业务需求打造Build for the needs of the business

必须根据业务需求作出每一个设计决策Every design decision must be justified by a business requirement

此设计原则看似不言自明,但在设计解决方案时请务必遵循此原则。This design principle may seem obvious, but it's crucial to keep in mind when designing a solution. 预期的用户数是数千还是数百万人?Do you anticipate millions of users, or a few thousand? 一小时应用程序中断也是可接受?Is a one-hour application outage acceptable? 您希望突然增加流量或可预测的工作负荷?Do you expect large bursts in traffic or a predictable workload? 最终,必须根据业务需求作出每一个设计决策。Ultimately, every design decision must be justified by a business requirement.

建议Recommendations

定义业务目标,包括恢复时间目标 (RTO)、恢复点目标 (RPO) 和可容忍的最长中断时间 (MTO)。Define business objectives, including the recovery time objective (RTO), recovery point objective (RPO), and maximum tolerable outage (MTO). 这些数字应为决策提供有关体系结构的信息。These numbers should inform decisions about the architecture. 例如,若要实现较低的 RTO,可能会向次要区域实施自动故障转移。For example, to achieve a low RTO, you might implement automated failover to a secondary region. 但如果你的解决方案可以接受较高的 RTO,则可能不需要该程度的冗余。But if your solution can tolerate a higher RTO, that degree of redundancy might be unnecessary.

记录服务级别协议 (SLA) 和服务级别目标 (SLO),包括可用性和性能指标。Document service level agreements (SLA) and service level objectives (SLO), including availability and performance metrics. 你可能会构建可用性为 99.95% 的解决方案。You might build a solution that delivers 99.95% availability. 这够了吗?Is that enough? 答案是需要业务决策。The answer is a business decision.

围绕业务领域为应用程序建模Model the application around the business domain. 首先分析业务需求。Start by analyzing the business requirements. 根据这些需求为应用程序建模。Use these requirements to model the application. 请考虑使用领域驱动设计 (DDD) 方法创建反映业务流程和用例的域模型Consider using a domain-driven design (DDD) approach to create domain models that reflect the business processes and use cases.

捕获功能性和非功能性需求Capture both functional and nonfunctional requirements. 可以通过功能性需求判断应用程序是否执行了所需操作。Functional requirements let you judge whether the application does the right thing. 可以通过非功能性需求判断应用程序的操作执行是否则正常。Nonfunctional requirements let you judge whether the application does those things well. 具体而言,确保你理解自己对可伸缩性、可用性和延迟的需求。In particular, make sure that you understand your requirements for scalability, availability, and latency. 这些需求将影响设计决策和技术选择。These requirements will influence design decisions and choice of technology.

按工作负荷分解Decompose by workload. 在此语境中,术语“工作负荷”是指某个离散的功能或计算任务,可以将它和其他任务逻辑分离。The term "workload" in this context means a discrete capability or computing task, which can be logically separated from other tasks. 不同的工作负荷在可用性、可伸缩性、数据一致性和灾难恢复方面具有不同的需求。Different workloads may have different requirements for availability, scalability, data consistency, and disaster recovery.

规划增长Plan for growth. 某解决方案可能满足你当前对用户数、事务量和数据存储等方面的需求。A solution might meet your current needs, in terms of number of users, volume of transactions, data storage, and so forth. 但是,可靠的应用程序可在不进行主要体系结构更改的情况下实现增长。However, a robust application can handle growth without major architectural changes. 请参阅设计为横向扩展分区避开限制See Design to scale out and Partition around limits. 也请注意,你的业务模型和业务需求很可能在一段时间后发生更改。Also consider that your business model and business requirements will likely change over time. 如果应用程序的服务模型和数据模型过于死板,则很难将应用程序用于新的用例和方案。If an application's service model and data models are too rigid, it becomes hard to evolve the application for new use cases and scenarios. 请参阅 Design for evolution(旨在改进)。See Design for evolution.

管理成本Manage costs. 在传统的本地应用程序中,您才支付提前硬件资本支出。In a traditional on-premises application, you pay upfront for hardware as a capital expenditure. 在云应用程序中,为使用的资源付费。In a cloud application, you pay for the resources that you consume. 确保了解所使用服务的定价模型。Make sure that you understand the pricing model for the services that you consume. 总成本包括网络带宽使用量、存储、IP 地址、服务消耗和其他因素。The total cost will include network bandwidth usage, storage, IP addresses, service consumption, and other factors. 有关详细信息,请参阅Azure 定价For more information, see Azure pricing. 也需考虑操作成本。Also consider your operations costs. 在云中,无需管理硬件或其他基础结构,但仍需管理应用程序,包括 DevOps、事件响应和灾难恢复等。In the cloud, you don't have to manage the hardware or other infrastructure, but you still need to manage your applications, including DevOps, incident response, disaster recovery, and so forth.