Operation
Google Cloud NAT
A high number of public IP addresses in your network poses a significant security threat to it. The danger of public IP addresses is also their greatest advantage; anyone can connect to personal devices, including individuals with malicious intent. For this reason, it is a best practice to limit the number of public IP addresses in your network. This is where Network Address Translation (NAT) comes into play, enabling your instances to have outbound access for updates, patches, etc., without requiring an external IP address.
However, setting up a traditional NAT is complex and requires reserving static IP addresses, creating compute instances, etc. In addition, with a traditional NAT, you have a NAT proxy instance sitting between your cloud instances and their destination. This can lead to a bottleneck that impairs performance and availability. With Google Cloud NAT, all of this can be avoided.
Cloud NAT is a software-defined solution that allows specific resources without external IP addresses to establish outbound connections to the internet. Cloud NAT provides outbound connectivity for VM instances created with Compute Engine without external IP addresses, as well as for private GKE clusters and Cloud Run instances, Cloud Functions, and App Engine standard environment instances via Serverless VPC Access. Cloud NAT's proxy was developed to overcome the problems of traditional proxies. So, how does it differ from typical proxies?
It is a software-defined, distributed, and managed service that is not based on proxy VMs or appliances. Cloud NAT acts like a proxy, but with a proxyless architecture. This architecture gives Cloud NAT advantages when scaling and eliminates bottlenecks, ensuring low latency and availability. Cloud NAT also provides Source Network Address Translation (SNAT) for VMs without external IP addresses. SNAT is implemented by configuring Andromeda, the software responsible for running your VPC network.
Google Cloud NAT Benefits
Security: The essence of proxies is to protect your internal network from cybercriminals. Cloud NAT ensures that external resources cannot directly access your instances behind it, keeping your VPCs isolated and secure without using a proxy. Cloud NAT allocates unique NAT IPs and port ranges to your instances, eliminating the need for each of your internal endpoints to have an external IP address.
Scalability: You can configure Cloud NAT to automatically scale the number of NAT IP addresses used. Cloud NAT scales seamlessly with the number of instances and the volume of network traffic. Because Cloud NAT assigns unique NAT IPs and does not use proxies, it eliminates the bottleneck issue, leading to better scalability.
Availability: Just like other solutions in GCP, Cloud NAT is a distributed and managed service. It is also software-defined, which makes it independent of the VM instances in your project or any single physical gateway appliance. Cloud Router provides a control plane for NAT, allowing you to create and deploy configurations for your Cloud NAT.
High performance: Google's Andromeda SDN implements Cloud NAT and ensures that it does not reduce network bandwidth per VM. Cloud NAT was designed to deliver just as much network bandwidth as instances with external IP addresses.



