Description
1. Summary
This KEP proposes an evolution of the Kubernetes scheduler, from a resource-focused optimizer to a holistic and ecosystem-aware "Harmonic Scheduler". The objective is to schedule workloads not just for resource efficiency, but for the health and harmonious performance of the entire microservices ecosystem.
2. Motivation
The standard Kubernetes scheduler is exceptional at placing pods based on resource requests and limits. Emerging features like Topology-Aware Scheduling are improving network awareness. However, these optimizations are often treated in isolation.
Inspired by the relational nature of musical harmony, where the value of a note depends on its context and by the coherent organization of energy fields in complex systems, we propose a scheduler that treats the cluster as an orchestra. The goal is not just to ensure each "instrument" (pod) has sufficient resources, but that they play in harmony.
3. Proposal
We suggest enhancing the scheduling framework with a new set of plugins that implement "Harmonic Scheduling". This would involve:
- Dynamic Affinity Graph: Instead of static affinity rules, the scheduler would maintain a dynamic graph of inter-pod communication, fed by real-time network telemetry (e.g., from a service mesh like Istio or Linkerd ). This graph would inform placement decisions to minimize latency for "consonant" services (that communicate frequently).
- Workload Dissonance Score: Introduce a new scoring priority that quantifies the "dissonance" of placing certain types of workloads together. For example, a CPU-intensive batch job would be considered dissonant with a latency-sensitive AI inference server. The scheduler would aim to minimize the total dissonance score on a node.
- Eudaimonic Feedback Loop: For complex workloads like AI/ML or stateful databases, the scheduler would accept direct feedback from the application about its performance (its "flourishing" or Eudaimonia ). For an ML training job, this could be the training throughput; for a database, the transaction latency. This feedback would be used to dynamically adjust resource allocations and pod placement in a co-evolutionary cycle, reflecting the principles of enactivism, where an agent and its environment are in structural coupling.
4. User Stories
- As a DevOps engineer, I want my communicative microservices to be automatically placed close together on the network, without me having to manually define complex pod affinities.
- As a data scientist, I want the cluster to automatically optimize resource allocation for my AI training job to maximize throughput, without me needing to become a Kubernetes expert.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status