Open zhllxt opened 1 year ago
In some high-performance application scenarios, such as HLS streaming servers, the speed and volume of requests can be extremely high. In such cases, initiating multiple async_accept calls simultaneously makes a lot of sense, as it ensures that the server can handle a large number of connection requests as quickly and concurrently as possible.
When a server needs to process a significant number of concurrent connection requests, relying solely on a single async_accept might lead to latency and performance bottlenecks. By initiating multiple async_accept calls at the same time, the server can start processing new connection requests almost immediately, thereby enhancing the overall throughput and response time.
You can also refer to: https://github.com/boostorg/beast/blob/develop/example/http/server/fast/http_server_fast.cpp