1 00:00:00,150 --> 00:00:08,690 ‫Bikers back with I have a project that wants to host six to 10 very very lightweight sorry six to 10 2 00:00:08,710 --> 00:00:11,020 ‫very very lightweight Web sites. 3 00:00:11,020 --> 00:00:17,770 ‫I could make a container for each but could also edit Apache config to multi host out of one container 4 00:00:17,820 --> 00:00:19,510 ‫are the tradeoffs. 5 00:00:19,600 --> 00:00:19,900 ‫All right. 6 00:00:19,930 --> 00:00:21,270 ‫So this is a great question. 7 00:00:21,280 --> 00:00:28,750 ‫Biker 2010 what you're asking is Apache servers because we've had Apache for decades and decades. 8 00:00:28,750 --> 00:00:34,540 ‫Apache Web servers have the ability to run many Web sites all in one daemon. 9 00:00:34,600 --> 00:00:34,870 ‫Right. 10 00:00:34,870 --> 00:00:41,410 ‫So one Apache HPD could run many different Web sites that are unrelated. 11 00:00:41,410 --> 00:00:49,480 ‫And should you do that vs. many containers so maybe one Web site per container or one large container 12 00:00:49,480 --> 00:00:51,460 ‫image that has all the Web sites. 13 00:00:51,460 --> 00:00:52,600 ‫Me my preference. 14 00:00:52,600 --> 00:00:58,840 ‫If I'm running containers especially if I'm running a orchestrator like swarm or Kubernetes is always 15 00:00:58,840 --> 00:01:00,080 ‫more containers. 16 00:01:00,100 --> 00:01:06,610 ‫The reason is is that Apache Apache obviously has that capability but that better capability was built 17 00:01:06,610 --> 00:01:11,570 ‫into Apache decades ago way before we had containers and isolation. 18 00:01:11,620 --> 00:01:14,890 ‫And if I can isolate my web sites into different containers. 19 00:01:14,890 --> 00:01:20,560 ‫Now in theory that means we are running more Apache demons and that's a little bit less efficient. 20 00:01:20,740 --> 00:01:25,810 ‫If you're really focused on very small servers with very little resource utilization. 21 00:01:25,900 --> 00:01:32,740 ‫So if you think about if you had 10 Web sites and they were all running an Apache daemon in a different 22 00:01:32,740 --> 00:01:38,110 ‫container then obviously you've got a lot more executable is running that's taking more ram and potentially 23 00:01:38,140 --> 00:01:39,780 ‫a little bit of wasted resources. 24 00:01:39,790 --> 00:01:44,350 ‫But if you're talking six to 10 you're not going to really gain anything if you were saying I need to 25 00:01:44,350 --> 00:01:50,890 ‫run a thousand Web sites and you have full control over all of them then you would have more significant 26 00:01:50,890 --> 00:01:56,650 ‫resource savings by putting those all in one container as one Apache and then essentially using different 27 00:01:56,680 --> 00:01:59,420 ‫Apache can figs for each Web site. 28 00:01:59,430 --> 00:02:03,110 ‫Right now that's very to me that's old school that's pre container. 29 00:02:03,140 --> 00:02:08,400 ‫I almost always would prefer isolating them in their own containers because that's easier to me. 30 00:02:08,440 --> 00:02:14,590 ‫I use will have one repo right for the code for that Web site and I'm going to put that repo into one 31 00:02:14,590 --> 00:02:18,060 ‫container image and there's that one to one relationship that makes sense to me. 32 00:02:18,130 --> 00:02:22,760 ‫You can also then scale those containers independently. 33 00:02:22,900 --> 00:02:29,800 ‫So if one needs to have three containers running for performance reasons or redundancy you can scale 34 00:02:29,800 --> 00:02:32,950 ‫that one independently of other containers and other Web sites. 35 00:02:32,950 --> 00:02:38,230 ‫Another reason if you need to update a Web site if you are doing the all in one container that means 36 00:02:38,230 --> 00:02:44,500 ‫now every web server has to restart just so that you can update that one container image whereas if 37 00:02:44,650 --> 00:02:49,870 ‫each one had its own container image and its own container then only the one that's changing would update. 38 00:02:49,870 --> 00:02:50,140 ‫Right. 39 00:02:50,140 --> 00:02:54,210 ‫So you would break potentially less you have less change overall. 40 00:02:54,220 --> 00:02:59,470 ‫So anyway that's just some of the good reasons to isolate and yeah the same reason goes for a lot of 41 00:02:59,470 --> 00:03:01,190 ‫other things like my sequel. 42 00:03:01,310 --> 00:03:03,820 ‫You know read this stuff like that. 43 00:03:03,910 --> 00:03:09,880 ‫Some people want to you know make everything into put everything on one huge Sequel Server and that's 44 00:03:09,880 --> 00:03:10,300 ‫fine. 45 00:03:10,300 --> 00:03:16,480 ‫That might make sense for you but there are also advantages to the isolation and the potential for updating 46 00:03:16,480 --> 00:03:18,340 ‫and stuff like that of breaking these things out. 47 00:03:18,700 --> 00:03:24,550 ‫So I think it's a little bit more fuzzy and not so black and white for databases because there is a 48 00:03:24,550 --> 00:03:29,650 ‫lot of efficiency when you talk about memory savings and stuff when you talk about building large scale 49 00:03:29,650 --> 00:03:35,410 ‫servers but when it comes to applications like web servers I always isolate them.