title: Telegram data center switch
body: <p>Whatever I try, I get my user associated to the Telegram data center 4.</p>
  
  <p>In this way I immediately receive the messages sent by users/channels on the same data center (Europe?), but I get messages sent by some other channels with 4-5 seconds of delay and I believe those messages are sent by users on the data center 1 (USA/America).</p>
  
  <p>This is the documentation about data centers:
  <a href="https://core.telegram.org/api/datacenter" rel="noreferrer">https://core.telegram.org/api/datacenter</a></p>
  
  <blockquote>
    <p>The client does not yet know which DC it will be associated with; therefore, it establishes an encrypted connection to a random address and sends its query to that address.
    Having received a phone_number from a client, we can find out whether or not it is registered in the system. If it is, then, if necessary, instead of sending a text message, we request that it establish a connection with a different DC first (PHONE_MIGRATE_X error).
    If we do not yet have a user with this number, we examine its IP-address. We can use it to identify the closest DC. Again, if necessary, we redirect the user to a different DC (NETWORK_MIGRATE_X error).</p>
  </blockquote>
  
  <p>Now, besides some <em>normal</em> attempts, I have registered a new user via a US proxy, the <code>nearestDC</code> request returned 1 as nearest data center and US as country, but still the response to the <code>auth.sendCode</code> request was a migration to the data center 4. The same happens if I try to send any request to any other DC (except for files stored there).</p>
  
  <p>How can I get a user registered or migrated to the data center 1?
  And, is it the different data center the reason for the delay on SOME CHANNELS messages?</p>
  
  <p>I know that, by the docs, my user could be migrated to a different data center if I keep connecting from an IP address near to it, but given that it did not work with registration, I'm not eager to waste may be one month or more for this kind of attempt; I would rather get a fresh user directly on the data center 1.</p>