Tutorials DevOps & Cloud Architect Mastery
Virtual Networks (VPC): Subnets, Gateways, and Peering
On this page
Cloud Networking: VPC & VNet
The network is the foundation of cloud security. A Virtual Private Cloud (VPC) or Virtual Network (VNet) allows you to create your own isolated network in the cloud.
1. Public vs Private Subnets
A professional architect never puts a Database in a Public Subnet.
- Public Subnet: Has a route to the Internet Gateway. Used for Load Balancers and Bastion Hosts.
- Private Subnet: No direct internet access. Used for Application Servers and Databases. They talk to the internet ONLY via a **NAT Gateway**.
2. VNet Peering
How do two different networks talk to each other? You could use the public internet, but that's slow and insecure. VNet Peering connects two networks using the cloud provider's internal, high-speed backbone. The traffic never leaves the private global network.
4. Interview Mastery
Q: "What is a 'Hub and Spoke' topology?"
Architect Answer: "It is the standard enterprise network design. The **Hub** centralizes shared services like Firewalls, VPN Gateways, and DNS. Each application lives in its own **Spoke** network. All Spokes talk to each other through the Hub. This allows the security team to monitor and control all traffic in one central place while allowing app teams to manage their own resources."