Score:0

How to setup Nginx container load balancer failover

cn flag

I am creating an API application which I want to deploy in the cloud and my application is made up of the following containers:

  1. Nginx Container: API Gateway
  2. API container
  3. SQL Server Database Container

I am using Nginx as a gateway to route all network traffic to the API container and I also have a dns which is https://www.example.com and points to the Nginx container endpoint.

In my production environment, nginx container can be used as a load balancing server. Then, in the case of a single node, nginx or this server may fail. In order to ensure high availability, the first thing to think about is to deploy another nginx server. But the IP addresses of two nginx servers are different. So how to ensure that when one server fails, the other server will be used automatically?

I know that Nginx HA (High availability) exists but it is for Onpremise environment. How could I use Nginx HA in my production environment in the cloud with containers and without using kubernetes, AWS Network Load Balancer, Azure Standard Load Balancer or Google Cloud Platform?

Any documentation, example or idea will be greatly appreciated.

Best

djdomi avatar
za flag
Requests for product, service, or learning material recommendations are off-topic because they attract low quality, opinionated and spam answers, and the answers become obsolete quickly. Instead, describe the business problem you are working on, the research you have done, and the steps taken so far to solve it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.