Pushlet long-polling webqq push technology

Source: Internet
Author: User

The HTTP persistent connection request policy is as follows:
The client initiates a request. If any response is returned, the request is processed and immediately resent. (That is, always have an activity request)
After the server receives the request, if there is no message, the connection will remain unresponsive and will not be returned until there is a message or more than n seconds.

 

The advantage of long polling is that if there is no message, the client will receive a request in n seconds.
If a message exists, it is immediately sent to the client. (If there is a new message when a request is responded, there is still a certain delay)
Compared with the persistent connection in IFRAME + script mode, it is easier to implement and does not display "loading" information in the browser.

In my personal understanding, using long polling with partial buffering can reduce server unlocking
A new message does not return immediately, but waits for a certain period of time to avoid excessive polling when messages are frequently sent.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.