

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 将 Local Zones 与 ElastiCache 结合使用
<a name="Local_zones"></a>

*本地扩展区* 是在地理位置上靠近用户的 AWS 区域的扩展。您可以通过创建新子网并将其分配到 Local Zones，将任何 Virtual Private Cloud (VPC) 从 AWS 父区域扩展到 Local Zones。当您在本地扩展区中创建子网时，VPC 也会扩展到该本地扩展区。本地扩展区中的子网与 VPC 中其他子网的运行相同。

通过使用 Local Zones，您可以将 ElastiCache 集群等资源放置在靠近用户的多个位置。

创建 ElastiCache 集群时，您可以选择 Local Zones 中的子网。Local Zones 有自己的 Internet 连接并支持 Direct Connect。因此，在本地扩展区中创建的资源可以通过非常低延迟的通信为本地用户提供服务。有关更多信息，请参阅 [AWSLocal Zones](https://aws.amazon.com/about-aws/global-infrastructure/localzones/)。

本地扩展区由 AWS 区域代码后跟一个指示位置的标识符表示，例如 `us-west-2-lax-1a`。

目前，可用的 Local Zones 是 `us-west-2-lax-1a` 和 `us-west-2-lax-1b`。

以下限制适用于 Local Zones 的 ElastiCache：
+ 不支持全局数据存储。
+ 不支持在线迁移。
+ Local Zones 目前支持以下节点类型：
  + 最新一代：

    **M5 节点类型：**、`cache.m5.large`、`cache.m5.xlarge`、`cache.m5.2xlarge`、`cache.m5.4xlarge`、`cache.m5.12xlarge``cache.m5.24xlarge`

    **R5 节点类型：**、`cache.r5.large`、`cache.r5.xlarge`、`cache.r5.2xlarge`、`cache.r5.4xlarge`、`cache.r5.12xlarge``cache.r5.24xlarge`

    **T3 节点类型：**、`cache.t3.micro`、`cache.t3.small``cache.t3.medium`

## 启用本地区域
<a name="Local_zones-using"></a>

1. 在 Amazon EC2 控制台中启用本地扩展区。

   有关更多信息，请参阅 *Amazon EC2 用户指南（适用于 Linux 实例）* 中的[启用 Local Zones](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#enable-zone-group)。

1. 在本地扩展区中创建子网。

   有关更多信息，请参阅 *Amazon VPC 用户指南* 中的[在 VPC 中创建子网](https://docs.aws.amazon.com/vpc/latest/userguide/working-with-vpcs.html#AddaSubnet)。

1. 在 Local Zones 中创建 ElastiCache 子网组。

   创建 ElastiCache 子网组时，请为 Local Zones 选择可用区组。

   有关更多信息，请参阅 [创建子网组](SubnetGroups.Creating.md)。

1. 创建一个使用 Local Zones 中的 ElastiCache 子网的 ElastiCache for Memcached 集群。

    有关更多信息，请参阅 [创建 Memcached 集群（控制台）](Clusters.Create-mc.md#Clusters.Create.CON.Memcached)。

1. 创建一个使用 Local Zones 中的 ElastiCache 子网的 ElastiCache for Redis OSS 集群。有关更多信息，请参阅下列主题之一：
   +  [创建 Valkey（已禁用集群模式）集群（控制台）](SubnetGroups.designing-cluster-pre.valkey.md#Clusters.Create.CON.valkey-gs)
   +  [创建 Valkey 或 Redis OSS（已启用集群模式）集群（控制台）](Clusters.Create.md#Clusters.Create.CON.RedisCluster)