Say there is an application powered by docker.
There could be containers for database, redis, etc and actual web containers (in my case it is php-fpm & nginx). Alternatively, it could be a purely web node with only web containers running.
My question - is there any benefit to have more then one such web container (php-fpm & nginx) on a single host? Would it increase performance? Could it decrease performance?
It's unlikely to increase performance, unless each of your containers is constrained in the resources it can utilise, either by application configuration (eg. an insufficient number of
php-fpm
workers) or by the container itself (CPU or RAM limitations).The main benefit that multiple web containers on a single physical machine provides is redundancy. You can do a rolling restart of your web containers, with a load balancer in front to detect failures, and have zero-downtime upgrades.