{"id":16479331,"url":"https://github.com/timebertt/thesis-controller-sharding","last_synced_at":"2025-03-21T07:30:24.684Z","repository":{"id":38412456,"uuid":"450775857","full_name":"timebertt/thesis-controller-sharding","owner":"timebertt","description":"Towards Horizontally Scalable Kubernetes Controllers (Study Project)","archived":false,"fork":false,"pushed_at":"2024-01-17T14:37:09.000Z","size":337,"stargazers_count":33,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T22:22:39.907Z","etag":null,"topics":["controller","distributed-systems","kubernetes","master-studies","scalability","sharding","thesis"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timebertt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-01-22T09:46:53.000Z","updated_at":"2024-05-25T17:56:27.000Z","dependencies_parsed_at":"2024-01-17T16:39:43.059Z","dependency_job_id":"cdea61c6-2f38-45b2-ab8d-7f66d8f5d12b","html_url":"https://github.com/timebertt/thesis-controller-sharding","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timebertt%2Fthesis-controller-sharding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timebertt%2Fthesis-controller-sharding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timebertt%2Fthesis-controller-sharding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timebertt%2Fthesis-controller-sharding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timebertt","download_url":"https://codeload.github.com/timebertt/thesis-controller-sharding/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244757048,"owners_count":20505314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["controller","distributed-systems","kubernetes","master-studies","scalability","sharding","thesis"],"created_at":"2024-10-11T12:51:40.566Z","updated_at":"2025-03-21T07:30:24.308Z","avatar_url":"https://github.com/timebertt.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Towards Horizontally Scalable Kubernetes Controllers\n\nRead the full paper [here](https://github.com/timebertt/thesis-controller-sharding/releases/tag/v1.0)!\n\n## About\n\nThis 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).\n\nYou 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).\n\nI continued the project and research in my Master's thesis \"Horizontally Scalable Kubernetes Controllers\".\nYou can find the Master's thesis in the [masters-thesis-controller-sharding](https://github.com/timebertt/masters-thesis-controller-sharding) repository.\n\n## Abstract\n\nControllers play an essential role in every Kubernetes cluster by realizing the desired state specified declaratively in API objects – a process referred to as reconciliation.\nTo prevent uncoordinated and conflicting actions of concurrent reconciliations, controllers use a leader election mechanism to determine a single active controller instance.\nBecause 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.\nI.e., leader election prevents Kubernetes controllers from being horizontally scalable.\n\nThis 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.\nIt 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.\nThe proposed design includes lease-based membership and failure detection as well as consistent hashing for partitioning.\nKubernetes API machinery primitives – namely, labels and label selectors – facilitate coordination between controller instances and prevent concurrent reconciliations of individual objects by multiple instances.\n\nFor demonstration and evaluation, the sharding design is implemented based on the controller-runtime library and used in an example operator.\nSystematic load test experiments show that the sharding implementation achieves a good distribution of object responsibility and resource usage across individual shard instances.\nHowever, 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.\nNevertheless, future work can perform optimizations of the presented design to overcome the discovered flaw.\n\nThe presented design and implementation allow scaling Kubernetes controllers horizontally providing potential for a wide range of applications in the Kubernetes ecosystem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimebertt%2Fthesis-controller-sharding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimebertt%2Fthesis-controller-sharding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimebertt%2Fthesis-controller-sharding/lists"}