- Published on
Naming a Global Network
- Authors
- Name
- Alex Lee
- @alexjoelee
"Use Planets"
No, we can't just use planets, or Star Wars characters, or the names of our favorite candy. Something unexpected that cropped up along the way when we starting designing the network for Skip2 was coming up with a consistent naming scheme for our servers and infrastructure. This work falls more on the side of system administration and networking that it usually does on development.
It's a common and fun response to say "Use planets" or "Use Star Wars characters" but when we're looking at having hundreds of servers, there's obviously no way that this would scale. Not only that, but these names are utterly useless and provide no information about what they identify.
Someone Already Did That
The great news is that coming up an extremely consistent shorthand naming scheme for every possible location in the world is hard, so the United Nations takes care of that for us. Specifically, the United Nations Economic Commission for Europe maintains the UN/LOCODE code list by country and territory.
This list provides an excellent format, basically matching this:
Country | Name | Full Location |
---|---|---|
XX | XXX | Example |
US | NYC | New York City, United States of America |
LU | BSN | Bissen, Luxembourg |
Following this format, our edge servers are named us-nyc-##
with numbers to identify the specific server or datacenter it's located in. This saves a ton of time when troubleshooting and trying to track traffic through logs.
If you examine the HTTP headers in this response, you can see which location served this response to you.
X-S2-Edge: us-chi-53
would be Chicago, IL, USA for example.