RC RANDOM CHAOS

How Telegram Really Assigns Data Centers — and Why DC3 Vanished

· via Hacker News

Original source

Mysteries of Telegram Data Centers (2022)

Hacker News →

Telegram runs five data centers (DC1 and DC3 in Miami, DC2 and DC4 in Amsterdam, DC5 in Singapore), and each account is permanently bound to one at registration based on the phone number’s country code — not the user’s location, and not changeable afterward. Chinese-community users on DC5 (which serves +86 numbers) are notorious for its frequent outages, while +1 numbers land on the fast, stable DC1 and European numbers hit DC4. A popular lookup bot appeared to show that DC2 and DC3 had no users at all, spawning theories that they were dormant backups.

That conclusion was an artifact of flawed measurement. The bot inferred a user’s DC from Telegram’s Web CDN subdomain (e.g. cdn4), but DC2 and DC3 piggyback on the CDN domains of the co-located DC4 and DC1 — so every DC2 user was silently misreported as DC4. More reliable methods (the auth.sendCode login flow, which returns a PHONE_MIGRATE_X error pointing to the correct DC, or reading the dc_id from an uploaded profile photo) reveal that DC2 in fact hosts a large user base, such as German +49 numbers.

DC3 is the real ghost. By generating and testing over 10,000 phone numbers against Telegram’s allocation rules, the author found DC3 no longer accepts registrations, and its former users appear to have been migrated to DC1 around 2020 — the handful of apparent DC3 accounts only have old files still stored there, with new uploads going to DC1. Because Telegram’s server logic is closed-source, these findings rest on protocol probing and inference rather than official documentation, a reminder of how much of the platform’s infrastructure behavior can only be reverse-engineered from the outside.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.