← Questions

Run and operate a monolith on Kubernetes

0
FigmaSystem designLast asked Sep 2025

A system design interview question asked in Figma's recruiter screen, last asked Sep 2025. It tests kubernetes, infrastructure and monoliths.

You join an infrastructure team whose backend is one large monolithic service. The company isn't moving to microservices and doesn't expect huge growth. How would you run, deploy and operate this monolith on Kubernetes? Expect the conversation to go deep on Kubernetes itself, then turn to when the architecture should change.

Requirements

  • Functional: serve all backend traffic from one service; deploy several times a day with no downtime; keep its databases, caches and object storage reliable; recover from bad deploys and lost nodes.
  • Non-functional: high availability within a region, and a plan for losing the region; predictable cost; fast diagnosis when something breaks; a small team can operate it.

Clarifying questions

  • How much traffic, and how does it vary through the day?
  • How long does the service take to start, and does it hold state in memory (sessions, caches)?
  • Which dependencies are managed services and which run in the cluster?
  • How often do we deploy, and how long can a rollout take?
  • What availability and recovery targets do we have?

What a strong answer covers

  • Topology: a Deployment with several replicas spread across zones (topology spread, anti-affinity), a PodDisruptionBudget, node pools sized for the service, and possibly separate deployments of the same image for web and background workers.
  • Traffic: a Service and an Ingress or gateway, readiness probes that reflect real readiness, liveness probes that don't kill a slow-but-healthy process, graceful shutdown with connection draining.
  • Config and secrets: ConfigMaps, a secret store, one image promoted through environments.
  • Rollouts: rolling updates with surge settings, canary or blue/green for risky changes, automatic rollback on error rates, database migrations that work with both the old and new versions.
  • Resources: requests from measured usage, memory limits, careful CPU limits (throttling), horizontal autoscaling on CPU or request rate, and cluster autoscaling.
  • Stateful dependencies kept outside the cluster where possible, with backups, restore drills and failover.
  • Observability: structured logs, metrics, traces, alerts tied to targets, runbooks and incident response.
  • When to split: signals such as deploy queues between teams, one part needing very different scaling, or failures spreading across areas. An incremental path: modular boundaries inside the monolith, clear data ownership, then extracting one service behind a stable API.

Follow-ups

  • Pods restart in a loop after a deploy, but only under load. How do you debug it?
  • A memory leak forces restarts every few hours. What do you do now, and later?
  • A migration needs to rewrite a large table. How do you deploy it without downtime?
  • What would make you recommend splitting out the first service?

Where it's asked

What it tests

kubernetes · infrastructure · monoliths

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing