Case Study: Tracking a Viral Infection Requires a Distributed Database
We love hearing about technologies from our sponsors doing good in the world. This week we got word about how Cockroach Labs’ open source distributed database is helping Germany get a handle on the COVID-19 pandemic.
Last year, the German government sponsored a hackathon to deal with the emerging COVID-19 crisis. One German startup responded with an application designed to track people’s COVID-19 symptoms. Central to the success of the application has been a set of open source technologies — as well as a strong distributed database to ensure scalability and security.
The project, called Quarano, went live just 10 weeks after the Hackathon. This system allows patients to log a diary of symptoms which is then monitored by the Health Authorities.
For the Hackathon challenge, the Quarano team wanted to focus their project on making the COVID-19 documentation process more effective. The German government operates on a Health Authority basis, meaning that each region in Germany has its own authority that makes its own rules for tracing the virus. Health Authorities used (and in some cases are still using) pen and paper to record people’s symptoms and who they have been in contact with.
Not only is this manual documentation method inefficient and unreliable, but it also significantly slows down the process of tracking the virus.
After the hackathon, the team had an open source "contact tracing" prototype that would allow authorities to understand where and how the virus was spreading. It could also be used to organize quarantines, and even offer health services for citizens.
With a working prototype ready, the team was confronted with a number of challenges to make it scale into production use, as well as to make it secure.
The application itself would need to easily scale to new regions should other authorities want to use it. For starters, all the technologies that make up Quarano needed to be open source, including the infrastructure, and the database.
This requirement led to a design built on Spring Boot, which exposed a REST API to track cases of COVID-19 infections. The application backend uses a standard Maven project based on a series of open-source technologies. Deutsche Telekom donated the hardware. Currently, the project uses three nodes (one per region) in Germany and each region has four vCPUs.
The team needed a database that could be hosted as a cluster on this private cloud. As per requirements, it would need to be open source and it would need to scale.
The Quarano team started building their application on another distributed database, but found the performance lacking. So they tested CockroachDB, and were pleased by its ability to scale and were intrigued by its geo-partitioning capabilities, should their product grow beyond Germany.
CockroachDB has a node-based architecture where each node functions on its own but is part of a cluster of nodes that presents as a single logical database. Every node is a gateway to the entirety of the database, and if a node fails, it automatically comes back online. This ensures Quarano will survive any failure and will always be on and available.
Security, of course, was also a factor for the team. The application collects a lot of data about users (age, gender, symptoms, location, etc). Because CockroachDB has built-in encryption, Quarano did not have to implement a supplemental encryption solution.
If Quarano adds an additional Health Authority located in a different region, they can simply add more nodes. When a node is pointed at the cluster, it instantly rebalances the data across all of the nodes to incorporate this new resource. With the addition of a new node, you also scale out the volume of transactions the single logical database can handle. This means that as you add nodes, you scale both reads and writes which would ensure that Quarano is performant.
Should the application’s reach expand beyond Germany, that’s when Quarano could leverage CockroachDB’s geo-partitioning features. Geo-partitioning ties data to a location at the row level. This helps Quarano meet latency requirements by keeping data close to its users, and it would also help with regulatory compliance that may require data to reside in a particular geographic jurisdiction.
Got a case study of how your open source cloud native technology is being used? Drop us a line! And be sure to check out Cockroach Labs’ page of other customer success stories.
|