
1. Meaning
If a service has multiple domain entry points and accessing it through any of them yields the same content, those domains are called peer domains.
For example, through peer domains you can provide three identical file or API services.
- https://server.chenshaowen.com/static/index.html
- https://server-peer-a.chenshaowen.com/static/index.html
- https://server-peer-b.chenshaowen.com/static/index.html
2. Uses
2.1 Raising the Browser Concurrency Limit
Browsers usually cap the maximum number of concurrent requests to a single domain at no more than 6 per second. Peer domains can significantly raise the ceiling on how many concurrent requests a browser can make to a service.
2.2 Proximity Access
This is similar to anycast technology, but anycast depends on a cloud vendor’s dedicated lines, whereas peer domains provide a self-built form of anycast.
2.3 Easier Troubleshooting
With peer domains you can easily test any route without resorting to traffic coloring inside the service.
2.4 Risk Avoidance
Besides using server-peer-a.chenshaowen.com and server-peer-b.chenshaowen.com as peer domains for server.chenshaowen.com, you can also use a.com and b.com as a group of peer domains. When a.com is blocked for any reason, you can switch to b.com and keep going.
