Load Balancing Volto & the backend

Apologies in advance if this has been asked before.

Our deployment is running into an issue that seems to prevent normal load-balancing measures from working. I've seen mostly examples (here & google) with either Docker or Zeo deployments but we're using neither.

Our setup is backend with 8 clients, ZODB is in RelStorage with a pooler handling the connections. Nginx is our load balancer and webserver. Volto is running in seamless mode as found over in the training

In order for our Volto to behave properly though (especially with files, downloads, and images) we've had to use a .env file with settings like:

PORT=3000
RAZZLE_API_PATH= https://www.some.website.edu
RAZZLE_INTERNAL_API_PATH= http://192.16.140.62:8081/yc1

If we don't include the internal API path as I said downloads, images, and files don't seem to work. The problem though is that even though we have upstream clients listed in our Nginx conf like:

192.16.140.62:8081
192.16.140.62:8082
192.16.140.62:8083
192.16.140.62:8084
....

That one internal API path listening (192.16.140.62:8081) becomes the bottleneck.

I supposed I could toss pound/HAproxy/ or something else but I'd rather not add or have to learn yet another tool. Any ideas on how we can resolve this issue? Any thoughts, suggestions, etc are appreciated. :beers:

Could you try creating a new internal frontend in nginx? Then you can set that nginx frontend as the internal api path for volto and it can handle the load balancing to internal clients.

We run a similar setup but we have internal haproxy load balancers which handle the internal api path traffic.

If you're running docker/docker compose, traefik is becoming increasingly popular to handle this kind of traffic. The volto docker-compose.yml has some good examples of how that works.

Thanks for the ideas. I'll have to discuss with the team to see if an internal strategy with nginx works for our use case.

I'm trying to avoid using yet another tool/product etc as we're a small shop and don't have the time or effort available to dedicate resources. Not using docker currently because I'm not comfortable with the surface area it consumes with networking and permissions. Also for development the rest of the team have little to no exposure to docker other than cursory trainings etc.

Cheers!