Round robin: common Ajax regularly sends requests to the service. It is generally implemented using setinterval of JavaScript. This method has low real-time performance and high server pressure.
Long polling: such as comet long polling. The client sends an Ajax request to the server. After connecting to the server, the client's participating server keeps connected. When the server has an update message, it is immediately sent to the client, and the connection is closed. After the client completes processing, it will send a new Ajax request to the server.(If the server does not return a message for a long time, the connection times out and the client sends a new Ajax request to the server.). This method has high real-time performance and low latency.
Persistent connections: such as comet persistent connections. The client sends an Ajax request to the server. After the client connects to the server, the client and the server remain connected. When the server has an update message, it will immediately send it to the client, and the connection will continue.(If the server does not return a message for a long time, the connection times out and the client sends a new Ajax request to the server.). This method is also highly real-time.