After finally joining Facebook (I know, a bit late to the party), I couldn't help but notice a curious thing about their live-chat module. It seems like the system is constantly searching for new answer messages every second, which, in my opinion, is quite fast. I can't imagine how they keep their servers from overheating.
I'm really curious about the concept behind this or at least how they manage to achieve such speed.
I haven't had the chance to inspect the XHR requests using Firebug yet.
My theory is that if the live-chat is held within an iframe and the XHRs are sent to a separate HTTP server, it would help maintain the "main" server's temperature. Additionally, utilizing the iframe method could prevent excessive bandwidth use due to cookies used by the main website.
Please refrain from responding with "They have hundreds of servers receiving millions of requests per minute, they'll be fine." I know there must be some unique tricks up their sleeves that I'm missing out on.
Does anyone have any ideas or insights on this matter?