Appearance
Networks
A network is a private, region-scoped network for your pods. Pods on the same network talk to each other on private IPs and private hostnames, on their internal service ports directly - no public internet, no port mapping, no firewall hops.
Properties
- CIDR - the private address range, e.g.
10.20.0.0/24. Must be a private IPv4 range, with a prefix from the block's own size down to /30:10.xallows /8-/30,172.16-31.xallows /12-/30,192.168.xallows /16-/30. Fixed once the network is created. - Gateway - the first usable address in the range, assigned for you.
- Region - a network lives in one region and can only hold pods from that same region. Fixed once created.
- Name - a friendly label, unique within your account.
Same-network communication
When two pods share a network, one reaches the other via:
- The private IP assigned from the CIDR range.
- The private hostname shown on the other pod's Connection Strings tab (e.g.
db-pod).
Both work on the internal service ports - SSH on 22, MySQL on 3306, your Node app on 3000, and so on. No need for the externally-mapped ports when you are already inside the network.
bash
# From inside another pod on the same network
ssh ubuntu@web-pod
mysql -h db-pod -P 3306 -u root -p
curl http://api-pod:3000/healthAttaching pods
Pods join a network from the pod side - pick the network when you create the pod, or from the pod's Networking tab later. The network and the pod must be in the same region.
A pod created without picking a network gets a brand-new private network of its own (it shows up in your Networks list and counts toward your network limit). Pods only talk privately when you put them on the same network - two pods left on their auto-created networks can't reach each other.
Use cases
- Run a database privately and expose only the web pod to the internet.
- Multi-pod apps where workers talk to a queue over private addresses.
- Stage and prod isolation, one network per environment.
Notes
- Networks are free.
- Networks are isolated per account.
- A network is created asynchronously and is ready to use once it goes Active (usually seconds).