Infrastructure
January 17, 2024

Quicker maps downloads from Asia, Australia and the Americas

I've deployed a change that replicates maps to two additional data centers: one in Western North America and one in Japan. If a map file is not cached in the CDN edge server near the player, it will be fetched from the nearest data center instead of always relying on the data center in Europe.

author
[T0]Marek
Last updated:
January 17, 2024

Quicker maps downloads from Asia, Australia and the Americas

We’re utilizing Cloudflare as our CDN provider for maps data. Map files are stored in a R2 bucket, and served via a Worker script that caches them on edge servers.

With the current size of the player base, and the size of map files, caching in the Cloudflare edge servers is not very effective and we don’t achieve high cache hit ratios. This often results in players having to download map files from the origin R2 bucket in Europe, leading to slower download speeds, especially for players outside Europe.

In a change deployed today I’ve added two additional R2 buckets, one located somewhere in Western North America and one in, I believe, Japan (Cloudflare doesn’t fully disclose the location of their buckets). The program that adds maps, will always upload them to all three buckets, and the Worker script running on edge servers will fetch the map files from the geographically nearest of the three buckets if map if not present in the local cache.

I hope that this change will improve the experience for players outside of Europe.

More Images

More microblogs