Hospitals in Kenya exist on a very unreliable power grid to the point that it is quite common for large scale battery backups and diesel generators are more reliable. This presents a significant hazard because when hospital systems fail, people die. The most common solution to this type of problem is to put a battery between the power grid and the systems that need to stay online so that when the power grid is no longer supplying power, the battery can and the computer doesn't lose power and shutdown. These solutions are known as uninterrupted power supplies (UPS). The issues UPSs is that the affordable batteries much too small to power large systems for more than a few minutes and batteries that are big enough to keep large systems online are much too expensive for most to buy. So how can computer systems be made more reliable if consistent and adequate power cannot be supplied? Change the power consumption of the computer systems to work with the unreliable supply.

At their core, computer exist of processors, memory and storage and if any one of these components becomes unavailable data is lost and systems crash. These single points of failure present an issue that can be solved by simply adding more of each of these components so that if one goes off, others are still available. This is known as cluster computing--combining multiple computers together to do a single job. However, with more computers comes more power consumption so we have to scale up with low power devices and this is where the Raspberry Pi comes in. The Pi is small, affordable, and uses less power than a cell phone let alone a full desktop or server computer. So when they're combined together, they provide many different processors, lots of memory, and can be connected to external storage with ease all while using less power than a single desktop. But that's just hardware.

Most software is meant to be run on a single computer with a single processor, and a small amount of memory. Specialized server software is available for high end computers with multiple processors and very large amounts of memory but Raspberry Pis are not those computers so that software is not available to us. So how can we make use of all of the Pis we want to connect together? Kubernetes. The Kubernetes project was started by Google and handed off to the open source community as a superset of the Docker container runtime which allows for isolated processes to be run with minimal overhead. These processes can be as small as moving a single file from one location to another or as complicated as an entire web server but because their isolated in their on container they can be moved around to different computers and still work. So now we have a hardware solution that gives large amounts of compute power while using less power than other solutions and a software layer that will let us run programs across the computers with ease. But that's only part of the beauty.

Kubernetes operates by having a central computer or set of central computers known as masters that tell the rest of the computers, the nodes, what parts of what jobs to do and how to do them. This models allows for dynamic scalability. The masters are smart enough to know when an existing node disappears--like when power is lost and a computer dies--and can seamlessly move work that was happening on those nodes to other nodes without losing data. The masters are also aware of when new nodes come on--like when the computer that died in the power outage restarts or when another computer is added--and can automatically start using their compute power to get the job done. This is great for tolerance against unreliable power but it allows us to intentionally turn on and off the individual computers to save power or increase compute power. It also allows for this process to be automated.

It's 2:00 AM at a hospital in Kenya. There are three patients on blood transfusions and another 2 patients in a medically induced coma. The machines that are keeping these people alive cannot go down for any reason or the patient will die. At the same time, doctors need to be able to access the computerized medical records, communicate with each other, and update information in the computer which means the computer systems must be online and available at all times. Then, a thunderstorm knocks out the power to the hospital.

With existing systems, large and affluent hospitals will fall back to battery banks and generators. However, smaller hospitals with small batteries can only operate for 5 minutes--just enough time to shutdown the systems without losing data. However, if these same small hospitals are using a cluster of Pis running Kubernetes the story is different. Instead of shutting down their single computer system and losing access to everything on them, they can simply shutdown some of the individual Raspberry Pis to reduce power usage and operate for much longer. The work being done by the Pis that have to be powered down is transitioned to the Pis that are still on without losing data and, while the system is slower, it is still available. Doctors can get the information they need, life support machines can still operate as needed, and life goes on.

With PiCluster, hospitals and other critical infrastructure can stay online even when other resources are not.

Share this project:

Updates