Nginx reverse proxy multi master architecture

Share this post to your friends !
  • 1
    Share

This entry is part 1 of 2 in the series Nginx reverse proxy multi master

SystemMen - Nginx reverse proxy is increasingly used with the same solution as HAproxy. But how to install nginx reverse proxy multi master? You can find many articles that teach the use of Keepalived to increase the availability of nginx reverse proxy systems. This article will upgrade that to make your system more responsive.

Requirements set out

The installation of nginx reverse proxy is quite simple, but most of the instructions are less referring to running a multi master server. Most tutorials use Keepalived and set up two servers: Master - Backup to back up each other.

This means that at one point only one nginx proxy server processes requests.

In case your system starts getting bigger, the nginx proxy server starts to overload. What will you do? You will increase the RAM, increase the CPU for it. I guess so.

In those cases, you will want to have a nginx reverse proxy multi master system. Just like you can run multiple server backends at the same time. Now, you can run multiple nginx proxy servers at the same time and the request will be processed by all proxies.

Nginx reverse proxy multi master – system architecture

I would like to mention architecture instead of going into installation immediately. That will make it easier to access the installation steps in the next article of the series.

I drew a logic diagram that makes it easy to imagine. As you can see, in my image I use two nginx proxy servers; However, with this architecture, you can increase the number to 3 or 4 or more according to your needs.

nginx-reverse-proxy-multi-master-architecture Nginx reverse proxy multi master architecture
Nginx reverse proxy multi master architecture.

On each server nginx, I will install the important packages include:

  • Nginx
  • HAproxy
  • Keepalived

How do these software work together? Most people just think that they spend HAproxy or just use Nginx proxy, because these two software have the ability to do reverse proxy the same.

In it, the components work as follows:

  • Nginx will have the main task of forwarding requests to server backends with the round robin method.
  • HAproxy will have the main task of forwarding the requests received on the Virtual IP to the Nginx servers with the round robin method.
  • Keepalived will have the main task of checking the status of the HAproxy service, still using the Master - Multi Backup model to assign the Virtual IP to the HAproxy servers.

Conclusion

In this section I will stop at the architecture part of the system. In the next article, I will cover the preparation of the server so that we can install a system according to the drawing architecture.

Continue reading the seriesNext part: Prepare resources for nginx reverse proxy servers »»
If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.


Share this post to your friends !
  • 1
    Share
If you appreciate what we share in this blog, you can support us by:
  1. Stay connected to: Facebook | Twitter | Google Plus | YouTube
  2. Subscribe email to recieve new posts from us: Sign up now.
  3. Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
  4. Become a Supporter - Make a contribution via PayPal.
  5. Support us by purchasing Ribbon Lite Child theme being using on this website.

We are thankful for your support.

«« »»

Got something to say? Join the discussion

Please keep in mind that all comments are subject to our Comment Policy. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data is processed.