Amazon, 2024
Region-aware routing for Prime Video traffic
A routing plugin that reads where a request comes from and steers it away from overcrowded mega-regions, across more than 50 AWS regions.
The summer after my freshman year, I joined the Astrolabe team at Amazon, which works on traffic routing for data centers around the world. Those data centers host the servers behind AWS, and in turn behind products like Prime Video.
The problem
A few regions, including PDX, DUB, and ZAZ, host a large share of AWS services. These mega-regions are gradually approaching capacity, meaning there's limited hardware left for a growing number of requests.
Default routing sent traffic by static priority rather than proximity or availability. A viewer in a rural area streaming Prime Video might be routed to a crowded region like DUB even when closer, less loaded options existed. The result was buffering and timeouts, especially at peak hours.
What I built
Prime Video already embeds a GeoToken in each request header, a two-character code for the viewer's country. I built a plugin, the GeoTokenHeaderExtractor (the name is long, I know), that intercepts incoming requests, parses the token, and uses it to route traffic to a closer region.
It was a first step toward region-aware routing: putting geographic context directly into the routing logic so fewer requests end up in distant, overcrowded mega-regions.
Outcome
I developed, launched, and tested the plugin, which reroutes live traffic across more than 50 regions, improving latency and cost efficiency for end users in underserved areas.