

# SUS02-BP04 根据其联网要求优化工作负载的地理位置
<a name="sus_sus_user_a5"></a>

为工作负载选择可缩短网络流量必须传输的距离的云位置和服务，并减少支持您的工作负载所需的总网络资源。

 **常见反模式：**
+  您根据自己所在的位置选择工作负载的区域。
+  将所有工作负载资源整合到一个地理位置中。
+  所有流量都会流经现有的数据中心。

 **建立此最佳实践的好处：**将工作负载放在接近用户的地方可以提供极低的延迟，同时减少网络中的数据移动并减小对环境的影响。

 **在未建立这种最佳实践的情况下暴露的风险等级：**中 

## 实施指导
<a name="implementation-guidance"></a>

 AWS 云 基础设施围绕区域、可用区、置放群组和边缘站点（例如，[AWS Outposts](https://docs.aws.amazon.com/outposts/latest/userguide/what-is-outposts.html) 和 [AWS Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/)。这些位置选项负责维护应用程序组件、云服务、边缘网络和本地数据中心之间的连接。

 分析您的工作负载中的网络访问模式，以便确定如何使用这些云位置选项和缩短网络流量必须传输的距离。

## 实施步骤
<a name="implementation-steps"></a>
+  分析工作负载中的网络访问模式，以便确定用户如何使用应用程序。
  +  使用 [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/) 和 [AWS CloudTrail](https://aws.amazon.com/cloudtrail/) 等监控工具收集有关网络活动的数据。
  +  分析数据以确定网络访问模式。
+  请根据以下关键元素，为您的工作负载部署选择区域：
  +  **您的可持续性目标：**如[地区选择](https://docs.aws.amazon.com/wellarchitected/latest/sustainability-pillar/region-selection.html)中所述。
  +  **数据所在位置：**对于数据密集型应用程序（如大数据和机器学习），应用程序代码的运行应尽量接近数据。
  +  **用户所在位置：**对于面向用户的应用程序，选择接近您工作负载用户的一个或多个区域。
  + **其他约束**：考虑成本和合规性等约束因素，如 [What to Consider when Selecting a Region for your Workloads](https://aws.amazon.com/blogs/architecture/what-to-consider-when-selecting-a-region-for-your-workloads/) 中所述。
+  对常用资产使用本地缓存或 [AWS 缓存解决方案](https://aws.amazon.com/caching/aws-caching/)，以提高性能，减少数据移动并减小对环境的影响。    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/wellarchitected/latest/framework/sus_sus_user_a5.html)
+  使用可帮助您在更接近工作负载用户的位置运行代码的服务：    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/wellarchitected/latest/framework/sus_sus_user_a5.html)
+  使用连接池来允许连接重用并减少所需资源。
+  使用不依赖于持久连接和同步更新的分布式数据存储来保持一致性，从而为区域人口提供服务。
+  用共享的动态容量代替预置的静态网络容量，并与其他订阅用户共享网络容量的可持续性影响。

## 资源
<a name="resources"></a>

 **相关文档：**
+  [优化您的 AWS 基础设施以实现可持续性，第 III 部分：联网](https://aws.amazon.com/blogs/architecture/optimizing-your-aws-infrastructure-for-sustainability-part-iii-networking/) 
+  [Amazon ElastiCache 文档](https://docs.aws.amazon.com/elasticache/index.html) 
+  [What is Amazon CloudFront?](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html)
+  [Amazon CloudFront 的主要功能](https://aws.amazon.com/cloudfront/features/) 
+ [AWS 全球基础设施](https://aws.amazon.com/about-aws/global-infrastructure/)
+ [AWS Local Zones and AWS Outposts, choosing the right technology for your edge workload ](https://aws.amazon.com/blogs/compute/aws-local-zones-and-aws-outposts-choosing-the-right-technology-for-your-edge-workload/)
+ [置放群组](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
+ [AWS Local Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/)
+ [AWS Outposts](https://aws.amazon.com/outposts/)

 **相关视频：**
+  [揭秘 AWS 上的数据传输](https://www.youtube.com/watch?v=-MqXgzw1IGA) 
+ [在新一代 Amazon EC2 实例上扩展网络性能](https://www.youtube.com/watch?v=jNYpWa7gf1A)
+ [AWS Local Zones Explainer Video](https://www.youtube.com/watch?v=JHt-D4_zh7w)
+ [AWS Outposts: Overview and How it Works](https://www.youtube.com/watch?v=ppG2FFB0mMQ)
+ [AWS re:Invent 2023 - A migration strategy for edge and on-premises workloads ](https://www.youtube.com/watch?v=4wUXzYNLvTw)
+ [AWS re:Invent 2021 - AWS Outposts: Bringing the AWS experience on premises](https://www.youtube.com/watch?v=FxVF6A22498)
+ [AWS re:Invent 2020 - AWS Wavelength: Run apps with ultra-low latency at 5G edge ](https://www.youtube.com/watch?v=AQ-GbAFDvpM)
+ [AWS re:Invent 2022 - AWS Local Zones: Building applications for a distributed edge](https://www.youtube.com/watch?v=bDnh_d-slhw)
+ [AWS re:Invent 2021 - Building low-latency websites with Amazon CloudFront](https://www.youtube.com/watch?v=9npcOZ1PP_c)
+ [AWS re:Invent 2022 - Improve performance and availability with AWS Global Accelerator](https://www.youtube.com/watch?v=s5sjsdDC0Lg)
+ [AWS re:Invent 2022 - Build your global wide area network using AWS](https://www.youtube.com/watch?v=flBieylTwvI)
+ [AWS re:Invent 2020: Global traffic management with Amazon Route 53](https://www.youtube.com/watch?v=E33dA6n9O7I)

 **相关示例：**
+  [AWS Networking 讲习会](https://catalog.workshops.aws/networking/en-US) 
+ [针对可持续性设计 – 最大限度地减少跨网络的数据移动](https://catalog.us-east-1.prod.workshops.aws/workshops/7c4f8394-8081-4737-aa1b-6ae811d46e0a/en-US)