The current architecture of the CHT uses a single container to run the various services, all hosted on a bespoke linux distribution, medic-os. This was designed to be very small to download and run on micro servers wherever needed. However as cloud and datacentre deployment has become the norm this is no longer required. We’ve been designing a new architecture which uses the industry standard approach of one container per service based on an off-the-shelf linux distribution.
This unlocks several exciting improvements for the CHT.
- Horizontal scalability. With each process in its own container it will be possible to start multiple instances of the same container to spread the load for large scale deployments. In the first release, this will be implemented for CouchDB to alleviate the most significant scalability bottleneck in CHT deployments. Read more about how we tested horizontal scalability performance.
- Dependency management. Each container will define its dependencies so services can require new libraries and keep up to the latest versions without requiring additional upgrade steps. This will be used immediately to increase the version of NodeJS from v8.x to the latest stable version v16.x.
- Process monitoring. With all services running in a single container it wasn’t always clear when a service such as sentinel was using all the server’s resources or even crashing. With this new architecture, administrators will have more visibility into how services are running. In addition, 3rd party monitoring tools designed to work with containers will just work further improving monitoring capabilities out of the box.
- Efficient logging. Another advantage of running a service per container is the log output of each is easy to access without needing an intermediate aggregator. This is a more efficient and reliable solution than the current process.
- Removing deprecated code. By complying with industry standard practices we can stop maintaining medic-os and use an official linux distribution instead. This saves on engineering effort and allows the CHT to benefit from improvements made in the upstream distro. Custom code for installing and starting API and Sentinel will also be deleted and replaced with 3rd party libraries.
- Easy installation. It will be much easier to install compared to earlier versions as the containers, services, and application code will be distributed in a single package.
Because this is a significant change to how the CHT will be deployed this will require a major version number and so will be shipped in the recently announced CHT v4.0.0. When the release is ready it will come with comprehensive documentation on how to migrate to the new improved architecture.
Keep an eye on the forum for updates.