2

What do people use to update the route-collection when having a NAT gateway compute instance fail? How do people setup multiple NAT gateways in a region and failover to each other?

1 Answer 1

2

One method is configuring multiple (two or more) NAT gateways for your Compute Engine VM instances. When creating routes to send traffic destined to the Internet through your gateway instances (step 5 of the article), specify the same value for the priority of all these routes. This should setup an automatic failover functionality.

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
3
  • Has anyone tried this solution and can confirm that it works? Or not? Sep 30, 2016 at 15:50
  • 1
    Well, it seems to work. I will test further and upvote when I will be sure. Sep 30, 2016 at 16:22
  • 4
    I got confirmation from "official" Google Support (from a ticket) that this is the right way to go. (I write "official" as Kamran is also from Google Support, but I assume that the above reply is unofficial one.) Oct 3, 2016 at 9:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .