Skip to main content

Posts

Showing posts from June, 2018

How to Use Nginx as a Load Balancer

<#include '/gkmsid/9058821'> Load balancing is a system that distributes network or application traffic across a number of servers. For example, you have your primary NGINX web server and want to distribute the load across two or three other NGINX servers; by doing this, you can ensure that no matter how much traffic you're getting, more than one server can take care of the load. Clearly, your web sites (on each NGINX server) will have to be set up identically for this to work (otherwise, you'd be distributing traffic across differing sites). With that said, I'm going to show you just how easy it is to setup NGINX for load balancing. I'll be demonstrating on Ubuntu Server 16.04, with three servers at IP addresses: Server 1 - 192.168.1.232 Server 2 - 192.168.1.233 Server 3 - 192.168.1.234 You will alter the configuration to meet your specific IP address scheme and needs (say you want to distribute across more servers). I will assume you alrea