Chapter 6. Clustering and Horizontal Scaling with LXC
Running applications inside LXC containers provides for a convenient way of allocating and limiting resources, as we saw in earlier chapters. LXC is also great for creating clusters of applications, for example, a web-server farm that can be scaled horizontally or vertically.
Horizontal scaling is a way of adding more computing power to a cluster or a group of resources performing a common task. This is usually accomplished by adding more servers, virtual machines, or in the case of LXC, more containers to run the applications. In contrast, vertical scaling is done by adding more hardware or virtual resources, such as CPU and memory, to physical servers, VMs, or containers.
In this chapter, we are going to put all the knowledge you've gained so far toward do the following:
- Creating a simple Apache cluster, running LXC on a minimal root filesystem with libvirt
- Implementing a multinode web cluster with Apache and HAProxy using...