title: How do you scale XMPP installation?
body: <p>We are working on building a XMPP server from scratch (due to specific needs we have). One of the areas where we are unable to get a clear picture is on how do you scale XMPP. Say I have 10,000 users and each instance of XMPP server can handle a maximum of 2,000 concurrent clients/connections. We will run multiple instance of XMPP and clients will use this to connect to one of the running instance as is mentioned here: <a href="http://xmpp.org/rfcs/rfc6120.html#tcp-resolution-prefer" rel="nofollow">http://xmpp.org/rfcs/rfc6120.html#tcp-resolution-prefer</a></p>
  
  <p>I think all major XMPP service providers use multiple server, like Google uses 5 XMPP servers as is mentioned here: <a href="http://kingant.net/check_xmpp_dns/?h=kingant.net" rel="nofollow">http://kingant.net/check_xmpp_dns/?h=kingant.net</a></p>
  
  <p>Now assuming I have two users : A and B. A connects to server_1 and B connects to server_2. When A sends a message to B, how does the whole flow of message occurs from A to server_1 to sever_2 to B? How does server_1 knows that B is connected to server_2? Is this done via S2S? Again, I am only concerned about the scalability and not inter-op between two different XMPP service provider.</p>
  
  <p>Any help will be great.</p>