NOTE

3.2 Multithreaded Server Implemented with BIO

Multithreaded Server Implemented with BIO: Traditionally, server-side programming uses BIO.

JavaCreated Updated 1 min readhistorical

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.

Maintaining many long-lived connections places a particularly heavy load on the server because they keep threads occupied.

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub