Summary

In this chapter, we examined several approaches to address the scalability of applications. Scalability refers to the ability of an application to compensate for increased loads placed on it. While our examples focused on applying these techniques to servers, they are equally applicable to clients.

We introduced three threading architectures, and we focused on two of them: thread-per-request and thread-per-connection. The thread-per-request model creates a new thread for each request that arrives at a server. This is suitable for situations where a client will make a single or possibly a few requests at a time.

The thread-per-connection model will create a thread to handle multiple requests from a client. This avoids having to reconnect ...

Get Learning Network Programming with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.