← Mercor Interview Insights

Mercor·Software Engineer·Technical Phone Screen·Senior

Senior
May 2026

Summary

Interviewed for an Infrastructure Engineer role at Mercor and got hit with a pretty deep Kubernetes question early on. Not a bad experience overall but this one required more precision than I had ready.

Questions Asked (1)

Q1

What's the difference between a ReplicaSet or Deployment and a StatefulSet in Kubernetes? Walk through pod identity, storage behavior, creation and deletion order, rolling updates, and when you'd pick one over the other.

System DesignTechnical Trade-offs
Author's notes

I knew the broad strokes but fumbled the specifics on storage.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying that ReplicaSet and Deployment are for stateless workloads while StatefulSet is for stateful workloads, then systematically compare them across pod identity, storage, creation/deletion order, and rolling updates. Conclude with practical guidance on when to choose each, emphasizing trade-offs.

Pro tip: Mention that Deployments manage ReplicaSets, so the real comparison is Deployment vs. StatefulSet; this shows you understand the hierarchy and avoids a common pitfall.

1. Define the controllers

Briefly explain that ReplicaSet ensures a specified number of identical pods, Deployment manages ReplicaSets for declarative updates, and StatefulSet provides guarantees about ordering and uniqueness.

2. Compare pod identity

Highlight that Deployment pods get random names and are interchangeable, while StatefulSet pods have stable, ordinal names (e.g., web-0, web-1) and a stable network identity via a headless service.

3. Contrast storage behavior

Explain that Deployment pods typically share or have no persistent storage, whereas StatefulSet pods each get their own PersistentVolumeClaim from a volumeClaimTemplate, ensuring data persistence across rescheduling.

4. Discuss creation, deletion, and updates

Describe that StatefulSets create pods sequentially (0 to N-1) and delete in reverse order, and rolling updates proceed in reverse ordinal order; Deployments create/delete pods in parallel and update all at once with surge/unavailable controls.

5. Choose the right tool

Summarize when to use each: Deployments for stateless apps, StatefulSets for databases, queues, or any app needing stable identity and persistent storage.

Key Points to Mention

  • Pod identity: StatefulSet pods have stable hostnames and network identities; Deployment pods are ephemeral and interchangeable.
  • Storage: StatefulSets use volumeClaimTemplates to give each pod its own PVC; Deployments typically use shared or no persistent volumes.
  • Ordering: StatefulSets create pods in order and delete in reverse; Deployments have no ordering guarantees.
  • Rolling updates: StatefulSets update pods one by one in reverse ordinal order; Deployments update all pods in parallel with configurable surge.
  • Use cases: Deployments for stateless microservices; StatefulSets for databases, message queues, and clustered applications.
  • Headless service: StatefulSets require a headless service for stable network identity.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.