当NAT网关计算实例失败时,人们用什么来更新路由集合? 人们如何在一个地区build立多个NAT网关并互相故障切换?
一种方法是为您的计算引擎VM实例configuration多个(两个或更多) NAT网关 。 在创build路由以通过网关实例发送到Internet的stream量( 本文的第 5步)时,请为所有这些路由的优先级指定相同的值 。 这应该设置一个自动故障转移function。
gcloud compute routes create no-ip-internet-route --network gce-network \ --destination-range 0.0.0.0/0 \ --next-hop-instance nat1-gateway \ --next-hop-instance-zone us-central1-a \ --tags no-ip --priority 800 gcloud compute routes create no-ip-internet-route --network gce-network \ --destination-range 0.0.0.0/0 \ --next-hop-instance nat2-gateway \ --next-hop-instance-zone us-central1-f \ --tags no-ip --priority 800