本頁面提供 Memorystore for Memcached 網路總覽。如需常見網路錯誤的清單,請參閱「網路錯誤情境」。
私人服務連線
Memorystore for Memcached 會使用私人服務連線,在專案和內部網路之間建立網路對等互連,以供部分 Google Cloud 服務使用,例如 Cloud SQL、Memorystore for Redis 和 Memorystore for Memcached。
也就是說,您必須先為網路建立私人服務存取連線,才能使用該網路建立 Memcached 執行個體。
使用私人服務存取連線的好處是,您可以為上述服務集中管理及自訂 IP 位址範圍。如需選取特定 IP 範圍分配的說明,請參閱「建立使用特定 IP 位址範圍的 Memcached 執行個體」。
透過私人服務連線進行地端部署存取
如果地端部署網路已連線至 Memorystore for Memcached 執行個體所連線的虛擬私有雲網路,您就能從地端部署網路中的用戶端連線。如要允許來自地端部署網路的連線,請按照下列步驟操作:
- 請確認 Shared VPC 網路已透過下列其中一種方式連線至內部部署網路:
- Cloud VPN 通道
- Dedicated Interconnect或 Partner Interconnect的互連網路連結 (VLAN)。
-
找出私人服務連線產生的對等互連。Memorystore for Memcached 使用的對等互連名稱為
servicenetworking-googleapis-com。 -
更新對等互連連線,方法是同時設定
--import-custom-routes和--export-custom-routes標記,交換自訂路徑。 - 找出私人服務連線使用的分配範圍。
- 為管理 Cloud VPN 通道或 Cloud Interconnect 連結 (VLAN) BGP 工作階段的 Cloud Router,建立 Cloud Router 自訂通告路由。
傳達網路需求
通常貴機構的網路團隊和/或網路管理員會負責設定私人服務連線。這樣一來,網路團隊就能確保用於其他Google Cloud 資源的 IP 位址或範圍不會重疊,以免造成連線問題。
建議您與貴機構的網路/安全團隊聯絡,請他們為您設定私有服務連線,尤其是在設定過程中發生錯誤時。與網路團隊聯絡時,請提供下列資訊:
The Memorystore for Memcached instance cannot be created due to the following error: "Google private services access is not enabled. Enable privates service access and try again." Before an instance can be created, a private service access connection needs to be established for network <project name: network>. Please refer to the following Memorystore documentation links for more information on how to create this connection: * Networking. * Establishing a private services access connection. * Verifying a private services access connection.
IP 位址
每個 Memorystore for Memcached 執行個體都有探索端點,且執行個體中的每個節點都有自己的 IP 位址。您可以在 Google Cloud 控制台中查看這些 IP 位址,也可以使用 gcloud memcache instances describe。
節點和探索端點的 IP 位址不會變更。
支援的網路和用戶端 IP 範圍
支援下列網路或具有 RFC 1918 IP 位址的執行個體:
- 虛擬私有雲網路 (舊版網路除外)
- Shared VPC 網路
- 地端系統
- 172.17.0.0/16 以外的 Compute Engine VM 執行個體,因為這個 IP 範圍保留給內部元件使用
- 建議您使用區塊大小至少為
/24的私人服務連線,支援 Memorystore for Memcached 和其他服務。不過,支援 Memorystore for Memcached 的最小區塊大小為/26。