KatInterview

Designing Kubernetes Concurrent App Scheduling and Dynamic Node-Signal Extensions

System DesignModel answer
HardModel answerSystem Designkubernetesdistributed-systemssystem-design

Last updated

Architect concurrent pod scheduling under capacity limits and design a custom Kubernetes scheduler plugin that uses real-time node telemetry for placement.

During a technical design interview for a senior infrastructure position, you are presented with two connected Kubernetes scheduling challenges.

Part 1: Simultaneous Multi-Workload Scheduling Strategy

Four distinct application workloads are deployed to a production Kubernetes cluster at the exact same moment. You are given no preliminary specifications regarding workload sizes, priorities, or cluster state.

  1. Formulate a structured set of diagnostic questions to uncover system constraints. Group these questions by the architectural decision each drives (e.g., Capacity, Priority & Preemption, Isolation & Co-location, Rollout Strategy).
  2. Explicitly detail how different answers to your questions dictate specific Kubernetes primitives (such as PriorityClass, PodDisruptionBudget, NodeAffinity, ResourceQuota, or custom custom schedulers).
  3. State a concrete set of assumptions for the four applications and outline an execution plan to safely schedule and launch all four without causing deadlocks or starvation.

Part 2: Dynamic Node-Feedback Scheduler Plugin Design

The default Kubernetes scheduler places pods primarily based on declared resource requests (resources.requests), which often diverge significantly from actual runtime resource usage (CPU throttling, memory pressure, cache contention, disk IOPS).

Design a custom Kubernetes custom scheduler plugin system that continuously feeds real-time node telemetry back into the scheduling cycle to improve placement decisions.

Your design should specify:

  • Telemetry Pipeline: Which node signals to collect, how they are gathered, and how they reach the custom scheduler efficiently and reliably.
  • Plugin Integration: Where the custom logic fits into the standard Kubernetes Scheduling Framework extension points (e.g., Filter, Score, Reserve).
  • Edge Cases & Guardrails: How the plugin handles data staleness, metrics agent failures, scheduling hot-spots (thundering herd), and cold starts.
  • Rollout & Validation: A strategy to safely roll out the plugin and quantify whether placement quality has actually improved.

Hints

Hint 1

Group your clarifying questions by operational domain (Capacity, Priority, Co-location, Rollout) to demonstrate systematic architecture discovery.

Hint 2

Remember that the default Kubernetes scheduler processes pods one at a time from an active queue; simultaneous deployments are ordered by PriorityClass and creation timestamp.

Hint 3

For the plugin design, leverage standard Kubernetes Scheduler Framework extension points like Filter (hard constraints) and Score (soft weighting).

Hint 4

Address the latency and reliability of telemetry carefully: avoid synchronous API calls during the scheduling cycle by using local in-memory caches populated via Custom Resource Definitions (CRDs) or lightweight streaming.