← mercor Interview Insights

mercor·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Kubernetes-heavy technical screen for a software engineer role at Mercor. Three questions, all infrastructure focused, no warmup fluff. Left feeling like I should've reviewed stateful workloads more before going in.

Questions Asked (3)

Q1

How does autoscaling work in Kubernetes, both at the pod level and the node level?

System DesignTechnical Trade-offs
Author's notes

I knew the HPA basics well enough, talked about CPU thresholds and how the metrics server feeds into it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by clearly distinguishing between the two levels of autoscaling — pod-level (HPA/VPA) and node-level (Cluster Autoscaler/Karpenter) — and explain how they complement each other. Use a concrete scenario, such as a traffic spike, to illustrate how both layers interact in practice. Conclude with trade-offs and tuning considerations to show depth.

Pro tip: Mention that HPA and Cluster Autoscaler work in tandem but can have timing mismatches — pods may enter a 'Pending' state before new nodes are provisioned — and that tools like Karpenter address this with faster, more intelligent node provisioning. This shows real-world operational awareness beyond textbook knowledge.

1. Define the Two Levels

Briefly introduce pod-level autoscaling (HPA and VPA) and node-level autoscaling (Cluster Autoscaler and Karpenter) to set a clear structure for your answer. Clarify that they solve different problems: workload scaling vs. infrastructure scaling.

2. Explain HPA (Horizontal Pod Autoscaler)

Describe how HPA monitors metrics (CPU, memory, or custom metrics via the Metrics Server or Prometheus adapter) and adjusts the number of pod replicas within a Deployment or StatefulSet. Mention the control loop, cooldown periods, and scaling thresholds.

3. Explain VPA (Vertical Pod Autoscaler)

Explain that VPA adjusts CPU and memory resource requests/limits for individual pods based on historical usage, and note that it typically requires pod restarts to apply changes. Highlight when VPA is preferred over HPA (e.g., single-threaded workloads that can't scale horizontally).

4. Explain Node-Level Autoscaling

Describe how the Cluster Autoscaler watches for unschedulable pods (Pending state) and provisions new nodes from a cloud provider's node group, and how Karpenter improves on this with faster, more flexible, cost-aware node provisioning. Mention scale-down logic — nodes are removed when underutilized for a configurable period.

5. Discuss Trade-offs and Best Practices

Address real-world considerations such as HPA/VPA conflicts (they shouldn't both manage the same resource), cold-start latency during scale-out, and the importance of setting proper resource requests for autoscaling to function correctly. Mention KEDA as an advanced option for event-driven autoscaling.

Key Points to Mention

  • HPA scales pod replicas based on metrics (CPU/memory/custom) using a control loop with configurable thresholds and stabilization windows
  • VPA right-sizes resource requests/limits but requires pod restarts and conflicts with HPA on the same resource dimension
  • Cluster Autoscaler triggers node provisioning when pods are in Pending state due to insufficient resources, and scales down underutilized nodes
  • Karpenter as a modern alternative to Cluster Autoscaler — faster provisioning, bin-packing optimization, and direct cloud API integration
  • The importance of accurate resource requests/limits as the foundation for all autoscaling decisions
  • KEDA (Kubernetes Event-Driven Autoscaling) for scaling based on external event sources like queue depth or database metrics

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

Q2

Walk me through how external traffic gets routed into the correct pods inside a Kubernetes cluster.

System DesignAPI & Integrations
Author's notes

This one went okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the high-level path from external client to pod, then drill into each component (LoadBalancer, Ingress, Service, kube-proxy, CNI). Emphasize how Kubernetes decouples stable virtual IPs from ephemeral pod IPs and how routing decisions are made at each hop.

Pro tip: Mention that while kube-proxy in iptables mode is common, modern clusters often use IPVS or eBPF (Cilium) for better performance and scalability—showing awareness of production trade-offs.

1. External Entry Point

Explain how traffic reaches the cluster via a cloud LoadBalancer or NodePort, which forwards to a Service virtual IP.

2. Ingress/L7 Routing

If using Ingress, describe how an Ingress controller (e.g., NGINX) terminates TLS and routes based on host/path to a backend Service.

3. Service to Endpoints

Detail how the Service selects pods via label selectors and maintains Endpoints (or EndpointSlices) with pod IPs and ports.

4. kube-proxy and Load Balancing

Describe how kube-proxy programs iptables/IPVS rules to DNAT the Service VIP to a chosen pod IP, often with round-robin or random selection.

5. Pod Network Delivery

Explain how the CNI plugin routes the packet to the target pod's network namespace, where the container receives it.

Key Points to Mention

  • Service types: ClusterIP, NodePort, LoadBalancer, and ExternalName
  • Ingress controllers and Ingress resources for HTTP/HTTPS routing
  • kube-proxy modes: iptables, IPVS, and eBPF-based alternatives
  • EndpointSlices for scalability and efficient endpoint management
  • CNI plugins (Calico, Flannel, Cilium) and their role in pod networking
  • DNS resolution (CoreDNS) for service discovery within the cluster

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

Q3

What are the differences between a ReplicaSet and a StatefulSet, and when would you actually choose one over the other?

System DesignTechnical Trade-offs
Author's notes

Probably my weakest answer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining both controllers in terms of their core design goals: ReplicaSet ensures a specified number of identical, stateless pods are running, while StatefulSet provides stable network identities, persistent storage, and ordered deployment/scaling for stateful applications. Then compare them across key dimensions like identity, storage, scaling, and use cases, and finish with concrete examples of when to choose each.

Pro tip: Mention that ReplicaSet is rarely used directly—it's usually managed by a Deployment—and that StatefulSet is essential for distributed systems like databases and message queues where pod identity and persistent storage matter. This shows you understand the broader Kubernetes ecosystem.

1. Define the core purpose of each

Explain that ReplicaSet maintains a stable set of replica pods for stateless workloads, while StatefulSet manages stateful applications by providing unique, stable identities and persistent storage.

2. Compare key characteristics

Contrast them on pod identity (random vs. ordinal), storage (shared or none vs. per-pod PersistentVolumeClaims), network identity (no stable hostname vs. stable hostname via headless service), and scaling behavior (parallel vs. ordered).

3. Discuss use cases and trade-offs

Give examples: ReplicaSet for stateless web servers or workers; StatefulSet for databases (e.g., MySQL, Cassandra), message queues (e.g., Kafka), or any app needing stable storage and identity. Highlight trade-offs like complexity and slower scaling with StatefulSets.

4. Explain when to choose one over the other

Conclude that you choose ReplicaSet (usually via Deployment) for stateless, interchangeable pods, and StatefulSet when pods require stable identity, persistent storage, or ordered operations.

Key Points to Mention

  • ReplicaSet is typically managed by a Deployment, which adds rollout and rollback capabilities.
  • StatefulSet provides stable, unique network identifiers (e.g., pod-0, pod-1) and persistent storage per pod.
  • StatefulSet ensures ordered deployment, scaling, and deletion, which is critical for clustered applications.
  • ReplicaSet pods are interchangeable and share no persistent storage; they are suited for stateless workloads.
  • StatefulSet requires a headless service to control network domain.
  • Examples: ReplicaSet for web frontends; StatefulSet for databases like PostgreSQL or distributed systems like Elasticsearch.

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