If you’re reading this you probably have multiple instances of your services running on docker containers and wondering how to balance the traffic between them.
For the sake of simplicity am going to assume that you have a ubuntu server running with docker installed and running Containers A and B
Let’s look at the options we have to solve this problem:
With Nginx installed on the host machine
Serving react front ends can be done in many ways, depending on your needs, but one effective way of doing it, if for sure using nginx, so stick with me
The way you might be doing it right now is using your rest api (express / rails), but this puts unwanted weight and traffic on your api, instead what we could do is seperate the serving of the front-end from the back-end.