This example deploys one authoritative DNS server, three edge sites, and one shared origin in a mini Internet, configuring region-specific DNS responses for a single service domain. Clients from different regions access different edge sites, which then proxy requests to the shared origin. By comparing DNS results and HTTP response headers, you can identify the edge site serving each request and the source of its content. You can further adjust regional mappings, add edge nodes, or change origin availability to investigate steering policies and service recovery behavior.
CDNService Baseline Example
This example validates the new CDNService and its integration with
DomainNameService.
The current design keeps the two services loosely coupled:
DNS explicitly exposes an include file through setInclude(...)
CDN explicitly writes policy-specific include content through setIncludeContent(...)
The topology is built on top of the mini Internet and models a simple CDN with:
one authoritative DNS server
three edge sites
one shared origin
one service domain: www.example.com
The CDN uses region-aware DNS answers:
East clients resolve to 10.181.0.100
West clients resolve to 10.182.0.100
Central clients resolve to 10.183.0.100
All three edge nodes proxy to the same origin at 10.184.0.10.
Topology
The example reuses the base topology from
examples/internet/B00_mini_internet.
CDN components:
DNS: AS150, 10.150.0.53
East edge: AS181, 10.181.0.100
West edge: AS182, 10.182.0.100
Central edge: AS183, 10.183.0.100
Shared origin: AS184, 10.184.0.10
Running
Generate the Docker output:
conda run -n seedpy310 python examples/internet/B30_CDN/cdn.py amd
This creates:
examples/internet/B30_CDN/output
Build and start the topology manually:
cd examples/internet/B30_CDN/output
DOCKER_BUILDKIT=0 docker compose build
docker compose up -d