Bookmarks

VPC — virtual private cloud

A logically isolated private network inside a cloud, where subnets, route tables and rules for accessing resources are set up.

Also: VPC, virtual private cloud network

checked 9 Nov

All terms

In a public cloud, a VPC gives you a network of your own, much like your on-premises data centre: you choose the address ranges, split them into subnets, set up routes and decide what is reachable from the internet and what stays internal. The isolation is logical: traffic from your cloud neighbours never enters your network.

What it is made of

ComponentWhat it does
Subneta range of IP addresses within the network; in AWS it occupies a single availability zone
Route tablewhere subnet traffic is directed: to an internet gateway, to NAT or to another network
Security groupa traffic filter on the resource itself: allowed protocols, ports and sources
Gatewaysthe way out to the internet (internet gateway), NAT for private subnets, VPN and peering to other VPCs

Public and private subnets

The typical layout has three tiers. Public subnets hold web servers behind a load balancer, private subnets hold application services, and deeper still sit databases with no path out at all. A route table sets the direction of traffic: in a public subnet the default route leads to the internet gateway, in a private one — to a NAT gateway, which only lets outbound connections through. Security groups close the ports: each tier accepts requests only from its neighbour, and the database cannot be reached from the internet.

bashA subnet in the `eu-central-1a` zone and a default route to the internet gateway
aws ec2 create-subnet \    --vpc-id vpc-0abc123 \    --cidr-block 10.30.8.0/22 \    --availability-zone eu-central-1aaws ec2 create-route \    --route-table-id rtb-0def456 \    --destination-cidr-block 0.0.0.0/0 \    --gateway-id igw-0ghi789

Where the term is used

The name VPC (Amazon Virtual Private Cloud) came from AWS. In Google Cloud the equivalent is called a VPC network, in Azure — a virtual network, in Yandex Cloud — a cloud network. There are structural differences: Azure subnets span every availability zone of a region at once, while an AWS subnet is tied to a single zone; a Google Cloud network is defined globally, with subnets defined per region. The idea is the same everywhere: a private address plan and traffic control within an isolated piece of the cloud.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • AZRegion and availability zone

    A region and an availability zone describe where data centres physically sit, while a VPC is a logical network deployed inside a region.

  • VLANvirtual LAN

    A VLAN segments the physical network of an office or data centre, while a VPC is a network that lives entirely inside the cloud, with its own address plan.

In depth in the references

where the topic is covered in detail