I'm noticing a growing queue in waitress when I do operations like copy and paste items. I only have one instance of the Plone backend and I'm guessing that additional instances will resolve this. Here's what I see in my logs.
We had this behaviour in a Plone 6 setup with 8 clients. Only a caching / load balancer setup reduced the requests. Since this has been active, we have never seen these warnings in the log.
Documentation is more sparse than I had hoped on running multiple zeo backends with a load balancer. I'm looking for the best way to load balance the setup if I use
command below.
docker-compose up -d --scale backend=5
That command launches the multiple backends
I noticed that if I have an entry like this in my docker-compose.yml, I get port conflicts when I use the scale option, as they all attempt to launch on port 8080.
backend:
build: .
...
ports:
- "8080:8080"
Changing the line to a list of ports ensures the backends launch on different ports
Seems identical, apart from using relstorage instead of a zeo db.
Running this command
docker-compose up -d --scale backend=5
I get the following error:
Error response from daemon: driver failed programming external connectivity on endpoint backend-5 (5b3c05d1c012d82f8275ede783b5cadcda4823e98bd575bc5520a50e936f25ef): Bind for 0.0.0.0:8080 failed: port is already allocated
This configuration launches instances running on ports 8080, 8081, 8082 etc....
The deploy, replicas lines replace using ---scale on the command line.
My site.conf file for nginx (placed in the sites-available/sites-enabled folder) looks like this:
upstream www {
server 127.0.0.1:8080;
server 127.0.0.1:8081;
server 127.0.0.1:8082;
server 127.0.0.1:8083;
}
server {
One issue I've come upon is that my current setup does not support rolling restarts.
This is a simple setup for a single machine but the lack of rolling restarts may force me to look at docker swarm or similar.
Coming back to this:
I still believe docker swarm or kubernetes is the next step, but...
The incremental step would be to add rolling deploy capabilities on top of my docker compose setup.
For this I will be borrowing from this guide: