在基于全球部署原型的架构中,应用在全球多个 Google Cloud 区域运行。您可以将应用部署为分布式位置未知型堆栈或多个区域隔离的堆栈。在任何一种情况下,全球任播负载平衡器都会将流量分配到适当的区域。该应用将数据写入在所有区域都提供的同步复制数据库(如具有多区域配置的 Spanner)中,并从中读取数据。应用堆栈的其他组件也可以是全球组件,例如缓存和对象存储。
下图展示了全球部署原型的分布式位置未知型变体:
上图显示了一个位置未知型应用堆栈,其前端和后端实例(通常是微服务)分布在三个 Google Cloud 区域的多个可用区中。全球任播负载均衡器将传入流量分配到适当的前端实例。这种分布取决于实例的可用性和容量,以及它们与流量来源的地理邻近度。跨区域内部负载均衡器会根据其可用性和容量,将来自前端实例的流量分配到相应的后端实例。该应用使用可以跨区域同步复制和可用的数据库。
下图展示了使用区域隔离应用堆栈的全球部署原型的变体
上图显示了在两个 Google Cloud 区域的多个可用区中运行的区域隔离应用堆栈。此拓扑与多区域部署原型类似,但使用的是全球任播负载平衡器,而不是 DNS 路由。全局负载均衡器将传入的流量分配到距离用户最近的区域的前端。这两个应用堆栈将数据写入同步读取和跨这两个区域可用的数据库。如果两个区域中的任何一个发生服务中断,则全局负载均衡器会将用户请求发送到另一个区域的前端。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-11-20。"],[[["The global deployment archetype involves running an application in multiple Google Cloud regions worldwide, utilizing a global anycast load balancer to direct traffic."],["Applications in a global deployment can be either location-unaware, with instances distributed across regions, or regionally isolated, with separate stacks in each region."],["A key component of this architecture is a synchronously replicated database, like Spanner, ensuring data consistency across all regions."],["This deployment strategy is ideal for applications needing high availability and robustness for a global audience, offering the potential for reduced costs and simpler operations compared to multi-regional setups."],["Considerations for global deployment include potential increases in storage, replication, and networking costs, as well as careful management of global resource changes to avoid single points of failure."]]],[]]