NeFut Logo NeFut
Admin Login

[Algorithms] Unveiling the Mysteries of Telegram Data Centers

Published at: 2026-07-15 22:00 Last updated: 2026-07-17 08:46
#algorithm #Data Structure #Open Source

Telegram claims to have 5 data centers (DCs), referred to as DC1 to DC5 in its code and documentation. DC1 and DC3 are located in Miami, USA; DC2 and DC4 are in Amsterdam, Netherlands; and DC5 is in Singapore.

User and Data Center Association

Each account is linked to a DC upon registration, which does not change with the user's phone number or geographic location. Users cannot freely choose a DC—if connected to the wrong DC, the server returns an error message, requiring the client to connect to the correct DC associated with the account.

Frequent Downtime of DC5

Among the 5 DCs, DC5 is particularly notorious in the Chinese Telegram community—not for quietly serving a large number of Chinese users, but for its frequent outages. When DC5 is down, users cannot access Telegram, leading to discussions like "Why is DC5 down again?" Users on DC5 can only wait for their continuously "reconnecting" clients to recover and then join group chats with users from other DCs to criticize DC5.

The Mystery of DC2 and DC3

To satisfy group members' curiosity, a bot was created to query the DC a user is on. Users registering with a +86 phone number found themselves on DC5 (Singapore), while those with a +1 number were on DC1 (Miami, USA), enjoying speed and stability. Users registered with European phone numbers found themselves on DC4 (Amsterdam), which is rare in the Chinese Telegram community.

But where are DC2 and DC3? By searching the bot's messages, it was found that DC1 had 360 users, DC4 had 50 users, and DC5 had 390 users, while DC2 and DC3 had 0. Some speculated that DC2 and DC3 had no users, while others theorized that they might be subordinate DCs to DC1 and DC4, accepting registrations only when their parent DCs were busy.

Telegram DC Allocation Rules

According to Telegram's DC allocation rules from May 2022, DC1, DC2, DC4, and DC5 are allocated based on the country code of the phone number provided at registration. These 4 DCs accept new user registrations at any time and have a large number of existing users. DC3 once had users, but around 2020, existing users may have been transferred to DC1. DC3 currently likely has no users and no longer accepts new registrations.

How to Determine Which DC You're On

There are currently 3 common methods to determine a DC:

Method 1 (Login Method)

Using a phone number that would be assigned to DC2, we connect to DC1 via Telegram's MTProto protocol, call the auth.sendCode interface, and attempt to send a verification code to register an account. The server returns a PHONE_MIGRATE_2 error, indicating that the client should connect to DC2.

Method 2 (Profile Picture/File Method)

After registering the DC2 account, we use a third-party client (Plus Messenger) to check the new account's DC. This method requires uploading a profile picture first.

Method 3 (Web CDN Method)

Finally, we use the bot mentioned earlier to query the new account's DC. The bot indicates that the account is on DC4. This occurs because the bot determines the user's DC via Telegram's Web CDN.

Through these methods, it's confirmed that DC2 users are not uncommon, but DC3 users are extremely rare. Extensive searching found only two users on DC3, but further analysis shows they may have been transferred to DC1.

Conclusion

In conclusion, DC3 no longer accepts new users, and existing users have likely all been transferred to DC1. If you want to register on a specific DC to avoid DC5's downtime risks, you can refer to the previous images and register with a phone number from a specific country code. Many conclusions in this article are speculative since Telegram's server and some operational mechanisms are not open-source; contributions and corrections are welcome.

Blogger's Review: The data center allocation mechanisms and user management strategies of Telegram reveal intriguing technical details, particularly the frequent outages of DC5. Using reasonable methods to identify users' data centers can not only enhance user experience but also provide important insights for Telegram's future development.

Original Source: https://dev.moe/en/3025

[h] Back to Home