Using a load balancer
Websites that deal with huge traffic generally use a technique called load balancing to improve the availability and responsiveness of applications. A load balancer distributes incoming traffic among multiple servers hosting same content. The distribution of load is determined by various scheduler algorithms.
In this section, we will see how to add a load balancer in front of our application servers (assuming that they are running on the IPs 127.0.0.1
, 127.0.0.2
, and 127.0.0.3
on the port 9000
) using different HTTP web servers.
Apache HTTP
The Apache HTTP server provides a secure, efficient, and extensible server that supports HTTP services. The Apache HTTP server can be used as a load balancer through its mod_proxy
and mod_proxy_balance ...
Get Mastering Play Framework for Scala 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.