Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timebertt/thesis-controller-sharding
Towards Horizontally Scalable Kubernetes Controllers (Study Project)
https://github.com/timebertt/thesis-controller-sharding
controller distributed-systems kubernetes master-studies scalability sharding thesis
Last synced: about 2 months ago
JSON representation
Towards Horizontally Scalable Kubernetes Controllers (Study Project)
- Host: GitHub
- URL: https://github.com/timebertt/thesis-controller-sharding
- Owner: timebertt
- Created: 2022-01-22T09:46:53.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T14:37:09.000Z (11 months ago)
- Last Synced: 2024-10-12T12:51:40.790Z (2 months ago)
- Topics: controller, distributed-systems, kubernetes, master-studies, scalability, sharding, thesis
- Language: TeX
- Homepage:
- Size: 329 KB
- Stars: 33
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Towards Horizontally Scalable Kubernetes Controllers
Read the full paper [here](https://github.com/timebertt/thesis-controller-sharding/releases/tag/v1.0)!
## About
This is a study thesis (study project / half-time thesis) part of my master's studies in Computer Science at the [DHBW Center for Advanced Studies](https://www.cas.dhbw.de/) (CAS).
You can find the implementation that was done as part of this thesis in the repository [kubernetes-controller-sharding](https://github.com/timebertt/kubernetes-controller-sharding/tree/v1.0).
I continued the project and research in my Master's thesis "Horizontally Scalable Kubernetes Controllers".
You can find the Master's thesis in the [masters-thesis-controller-sharding](https://github.com/timebertt/masters-thesis-controller-sharding) repository.## Abstract
Controllers play an essential role in every Kubernetes cluster by realizing the desired state specified declaratively in API objects – a process referred to as reconciliation.
To prevent uncoordinated and conflicting actions of concurrent reconciliations, controllers use a leader election mechanism to determine a single active controller instance.
Because of this, reconciliations cannot be distributed among multiple controller instances which effectively limits the system's capacity and throughput by the available machine sizes and network bandwidth of the underlying infrastructure.
I.e., leader election prevents Kubernetes controllers from being horizontally scalable.This thesis presents the first steps towards horizontally scalable Kubernetes controllers by introducing a design for distributing the reconciliation of API objects across multiple controller instances, i.e., sharding for Kubernetes controllers.
It shows that proven sharding mechanisms used in distributed databases can be applied to the problem space of Kubernetes controllers as well to overcome the mentioned scalability limitation.
The proposed design includes lease-based membership and failure detection as well as consistent hashing for partitioning.
Kubernetes API machinery primitives – namely, labels and label selectors – facilitate coordination between controller instances and prevent concurrent reconciliations of individual objects by multiple instances.For demonstration and evaluation, the sharding design is implemented based on the controller-runtime library and used in an example operator.
Systematic load test experiments show that the sharding implementation achieves a good distribution of object responsibility and resource usage across individual shard instances.
However, the experiment results also point out that one of the controller instances always has a high resource footprint in comparison to the other shards which limits the scalability of the system.
Nevertheless, future work can perform optimizations of the presented design to overcome the discovered flaw.The presented design and implementation allow scaling Kubernetes controllers horizontally providing potential for a wide range of applications in the Kubernetes ecosystem.