NOTE
3.2 Multithreaded Server Implemented with BIO
Traditional server-side programming with BIO and its blocking points.
This is a historical learning note and may contain outdated or incomplete understanding.

Traditionally, server-side programming uses BIO.
However, this approach has two blocking points: ServerSocket.accept() and InputStream.read(). Therefore, a single thread can serve only one client.
To serve multiple users, multiple threads must be used to process read requests, but thread resources are limited.
Especially for long-lived connections, maintaining so many long-lived connections consumes too many server resources because thread resources remain occupied.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub