Reputation: 3639
I am programming a toy example to do NAT traversal. Interested in how a widely used desktop application does that, I used wireshark to try to analyze its traffic. After a some study of the output I realized that server notifications (e. g., "new file added to your xxx folder") worked using some kind of Comet mechanism, with long lived HTTP connections. But the thing that amazed me the most was that, despite the low traffic (1 HTTP GET and its response every minute) the TCP connection was never closed. I can assure that the connection was not closed during at least 20 minutes.
So far, my understanding is that having a lot of long lived TCP connections opened at the same time consumes quickly the resources of the server (mainly in terms of memory). So my question is, how do this kind of applications manage to efficiently keep such a huge number of TCP and HTTP connections opened at the same time during long periods? Do they use some special kind of server? Or is it only matter of adding hardware to scale horizontally?
I googled a lot trying to find an answer, with no luck. Perhaps I am missing something pretty obvious.
Upvotes: 0
Views: 809