Load balancer

A load balancer is a key tool to scale servers. So, let's say, you have 10 boxes with our Play framework application or 10 Docker containers. We will need something in front of our application to distribute the traffic. There are several servers that can do this, such as NGINX (https://nginx.org/) and Apache HTTP Server (https://httpd.apache.org/). If you want to scale your application, this is the easiest solution for it. Configuration and more details can be found at

https://www.playframework.com/documentation/2.5.x/HTTPServer#Setting-up-a-front

-end-HTTP-server.

Load balancers are often proxy servers as well. You can use them to have HTTPS support. If you want, you can have HTTPS on Play framework as well

(https://www.playframework.com/documentation/2.5.x/ConfiguringHttps). Keep in mind that you will need to change swagger embedded installation as all the code that we have points to the HTTP interface. If you are doing deploys in the AWS cloud, you will need to change some of the configuration to forward the proxies, which you can find at

https://www.playframework.com/documentation/2.5.x/HTTPServer#Setting-up-a-front

-end-HTTP-server.

 
Source