‫Bikers back with I have a project that wants to host six to 10 very very lightweight sorry six to 10
‫very very lightweight Web sites.
‫I could make a container for each but could also edit Apache config to multi host out of one container
‫are the tradeoffs.
‫All right.
‫So this is a great question.
‫Biker 2010 what you're asking is Apache servers because we've had Apache for decades and decades.
‫Apache Web servers have the ability to run many Web sites all in one daemon.
‫Right.
‫So one Apache HPD could run many different Web sites that are unrelated.
‫And should you do that vs. many containers so maybe one Web site per container or one large container
‫image that has all the Web sites.
‫Me my preference.
‫If I'm running containers especially if I'm running a orchestrator like swarm or Kubernetes is always
‫more containers.
‫The reason is is that Apache Apache obviously has that capability but that better capability was built
‫into Apache decades ago way before we had containers and isolation.
‫And if I can isolate my web sites into different containers.
‫Now in theory that means we are running more Apache demons and that's a little bit less efficient.
‫If you're really focused on very small servers with very little resource utilization.
‫So if you think about if you had 10 Web sites and they were all running an Apache daemon in a different
‫container then obviously you've got a lot more executable is running that's taking more ram and potentially
‫a little bit of wasted resources.
‫But if you're talking six to 10 you're not going to really gain anything if you were saying I need to
‫run a thousand Web sites and you have full control over all of them then you would have more significant
‫resource savings by putting those all in one container as one Apache and then essentially using different
‫Apache can figs for each Web site.
‫Right now that's very to me that's old school that's pre container.
‫I almost always would prefer isolating them in their own containers because that's easier to me.
‫I use will have one repo right for the code for that Web site and I'm going to put that repo into one
‫container image and there's that one to one relationship that makes sense to me.
‫You can also then scale those containers independently.
‫So if one needs to have three containers running for performance reasons or redundancy you can scale
‫that one independently of other containers and other Web sites.
‫Another reason if you need to update a Web site if you are doing the all in one container that means
‫now every web server has to restart just so that you can update that one container image whereas if
‫each one had its own container image and its own container then only the one that's changing would update.
‫Right.
‫So you would break potentially less you have less change overall.
‫So anyway that's just some of the good reasons to isolate and yeah the same reason goes for a lot of
‫other things like my sequel.
‫You know read this stuff like that.
‫Some people want to you know make everything into put everything on one huge Sequel Server and that's
‫fine.
‫That might make sense for you but there are also advantages to the isolation and the potential for updating
‫and stuff like that of breaking these things out.
‫So I think it's a little bit more fuzzy and not so black and white for databases because there is a
‫lot of efficiency when you talk about memory savings and stuff when you talk about building large scale
‫servers but when it comes to applications like web servers I always isolate them.