July 2022 update on cht-core 4.0.0

4.0.0 development has reached a significant milestone this week with the successful completion of the scalability test suite. This is a re-run of the test executed before development began, but this time it’s against an actual clustered CHT rather than a simulated environment. This was executed to verify the work done so far has achieved the scalability improvements that were expected when it was decided to proceed with the horizontal scalability architecture. The performance results are consistent with the proof of concept testing done late last year, and confirms the approach taken is the correct one.

Screenshot from 2022-07-18 06-02-55

Another view of the data is to see how the performance changes as more users are added. Here you can see that while CHT v3 got progressively slower as more users replicate, v4 scales linearly with the additional load.


This was the final unknown for the release and development is now focusing on resolving a few remaining known issues, stabilising CI testing suites, and documentation of installation and upgrading.

Thanks to @diana @hareet @henok for their continued effort!


Thank you @hareet @henok and @gareth!


This is fantastic news! Well done!

1 Like

Thank you . This is a great step forward.


Much more detailed information will be published as we get closer to the 4.0, but I wanted to share a brief FAQ with technical details (courtesy of @gareth) that might be interesting:

What parts of the architecture will be broken into their own containers?

As per Docker best practice, every service will be in its own container, ie: api, sentinel, couch, nginx, haproxy, and the upgrade service (previously horti). We may decide in future to add additional services or split existing services into multiple services, but we’re keeping it as simple as possible for 4.0.0.

Will it be possible to easily connect to a Couch cluster running on a separate host?

Yes. We’re looking to support multiple types of deployments:

  1. Medic-hosted of all sizes
  2. Small self-hosted with a single node couch that just works out of the box
  3. Large self-hosted where the CouchDB is managed independently to CHT Core.
    • This gives flexibility for how it’s deployed, how many nodes in the cluster, and so on. The downside is when a CouchDB upgrade is required this will be an additional manual step in the upgrade process.

Where can I see the code?

Currently, the major components of the new architecture coming in 4.0 are being developed in the archv3 branch. For example, the Dockerfile for the new CouchDB docker containers can be found here.

Note, however, this is a work in progress and the contents of that branch may change over time and may not be what is ultimately released.

Feel free to respond below with any questions or feedback!