Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have been using instant messengers like yahoo, gtalk, skype for more than 10 years but I still wonder what is the mechanism working behind it.

As per my understanding of a request on Internet, we send a request to server which returns us a response. That will explain how my messages are being sent to server. But what I don't get is how I receive a message from sender instantly.

One way I can think of is that my messenger keeps on checking with server after a fixed interval (say 5 seconds) for a new message (polling), but that sounds very expensive in terms of bandwidth.

The second way I can think of is that messenger somehow maintains a connection with server and receives the messages as they come to server. But in that case, isn't Internet supposed to work in a request-response mode?

Third way can be that server connects to the messenger and sends the message when it receives one. That too sounds unconvincing as how can server know location of messenger (IP address)?

share|improve this question

closed as not constructive by Mokubai, MaQleod, Paul, 8088, Randolph West Aug 13 '12 at 7:54

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
i ll post the answer in detail for your reference computer.howstuffworks.com/e-mail-messaging/… –  BlueBerry - vignesh4303 Aug 13 '12 at 6:59
add comment