Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Do I have to copy the same website files to the different backend servers? If yes, do i have to ask all the apache servers read from the same mysql server?
@marwan, this article is for nginx and not apache - to answer your questions, yes you do have to keep the same set of files on each of the server, and yes, a database (only) server sitting behind it
Self answer
To deal with https that should probably look something like: proxy_pass $scheme://backend;
Not tested.
So simple, so useful. Thank you!
For those asking about sessions, storing them in a central location is ideal: mysql, mongodb, memcache, etc. If (for whatever reason) you need to store them locally, I suspect the “ip_hash” directive mentioned above should keep them working (as it keeps your visitors tied to one machine).
How do we make sure the load balancer never fails? For example in case of an outage on DigitalOcean, or any problem with the droplet nginx runs on.
For me the main use case of a load balancer is to avoid downtime when a droplet with my web server fails. More droplets, more redundancy. But now nginx will be the single point of failure, am I wrong?