0

Currently looking at rebuilding a webserver from running 10-20 websites on a single Apache server to a NGINX proxy setup with separate docker stacks for each website.

However I noticed the current Apache setup uses very little RAM, which makes me wonder if setting up separate NGINX + FPM + MySQL stacks for every website might be overkill performance wise for the environment I'm in.

At which point should someone consider separating their websites away from a solo Apache/NGINX process?

1
  • I guess isolation for security or to guarantee performance for critical websites(s) could be good reasons to have separate php-fpm pools. Otherwise I would leave everything together, as it's likely more efficient to have each website use a pool of Nginx / PHP / MySQL processes than to dedicate processes to each website. I have six low volume websites on one Nginx / PHP / MySQL server. I have a separate php-fpm pool for a test website that has different PHP settings, with a default of zero processes running but one process created on demand.
    – Tim
    Oct 3, 2019 at 8:28

1 Answer 1

1

Shared web server or database server will use less resources. Fewer copies in memory and on CPU. Single instance also means it works without needing to manage many containers or VMs.

An instance per site gives more flexibility. Each can be updated independently or migrated to different hosts. More work to maintain them all, but that can be automated. This always was an option, but containers make less expensive to do.

Or a hybrid. Multiple databases on a shared host to deal with persistence, and many web server installs on containers or VMs or whatever.

You decide if shared or multiple instances makes sense for your applications.

1
  • Great idea, I've decided to use specific docker stacks as "pools" of multiple low-octane websites while creating separate stacks for the more demanding ones.
    – Ben
    Oct 30, 2019 at 8:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .