Synchronization request: After the sender sends a packet, it waits for the receiver to send back a response before sending the next packet's communication mode.
Asynchronous request: After sending a packet, the sender can send the next packet to communicate without waiting for the receiver to send back the response.
Synchronous communication: The communication between the two sides at the same clock frequency, and accurate coordination, through the sharing of a single clock or timing pulse source to ensure accurate synchronization between the two sides, high efficiency.
Asynchronous communication: Do not require synchronization between the two parties, the two sides can adopt their own time source, follow the asynchronous communication protocol, the character is the data transmission unit, the transmission of the character interval is uncertain, the transmission efficiency is lower than synchronous communication.
Synchronization request: Through a single-threaded service, the thread sends a request, blocks when the server is running, and waits for a response.
Asynchronous request: The service is invoked through two threads, one thread sends the request, and another individual thread receives the response.
Synchronization: When the service is running, the block crashes and the restart service cannot connect to the call, so the response is lost. You can only repeat the call procedure and expect this time to not crash.
Async: When a consumer sends a request and waits for a response to crash, the restart service continues to wait for the response, so the response is not lost.
The synchronization request cannot continue to use the browser while waiting for the response, but the asynchronous request, without waiting for a response, continues to use the browser. No effect on the customer.
Differences between synchronous requests and asynchronous requests (for AJAX purposes)