Load Balancing DNS with Google Cloud Platform [closed]

I plan to achieve load balancing by using Google to balance NS/DNS between each of three servers.

I am setting up three servers with cluster DNS, records are replicated between each server.

I plan to setup NS1/2.example to point towards Google's Load Balancer (Anycast) instead of pointing NS1/2.example to each individual server.

How could I achieve that? What should I be aware of?


Solution 1:

  1. Create an Instance Template
  2. Create a Managed Instance Group (MIG)
  3. Create a Network Load Balancer pointing to MIG

Note that load balancing UDP has a problem where it doesn't answer the client with the load balancer as the source IP, which causes the client to reject these requests. To solve this you need to create a rule (using iptables or nftables) to replace it when the packet is outgoing the server.

More info at How to use UDP with Google Cloud Network Load Balancing