From Baremetal to Kubernetes: YDB’s Journey
This case study aims to demonstrate how large-scale bare-metal deployments of stateful applications, like YDB, an open-source distributed database, can be integrated into Kubernetes. It has long been assumed that Kubernetes is primarily suited for stateless applications. However, in this talk, we will explore the challenges of managing stateful workloads: for instance, how to solve a particular problem of attaching YDB to raw block devices to achieve optimal performance while maintaining security.
Additionally, Kubernetes itself offers significant value. With the help of a Kubernetes operator, maintenance tasks can be automated, ensuring database cluster awareness. For example, during version updates, it is crucial to bulk-update only the nodes that won't impact the overall performance of the database cluster.
Applications rarely require access to drives as raw block devices. In order to obtain maximum performance, YDB communicates with drives in block mode, without any filesystem. A number of issues arise. How to maintain POSIX locks on drives, so that each drive can be used only by one container at a time? We will share our experience and several useful practices developed along the way.