Interview questions

Load balancing interview questions

11 questions, 11 with model answers. Every member practises all of them free.

Samples

3 of 11 questions.

A new AWS ALB config caused TLS handshakes to fail intermittently. Walk through your full RCA path.

Show the answer
  1. Reproduce and scope: check if failures are intermittent (some requests succeed) or total (all fail). Use curl -v https://example.com to capture the TLS handshake details — look for the cipher suite and certificate presented.
  2. ALB access logs: enable ALB access logs to S3; filter for ssl_cipher and ssl_protocol fields to see which TLS sessions are failing and from which client IPs.
  3. CloudWatch metrics: check ClientTLSNegotiationErrorCount metric on the ALB — spike confirms TLS-specific failures, not app-level errors.
  4. Security policy change: review recent ALB changes. A new SSL security policy (e.g., ELBSecurityPolicy-TLS13-1-2-2021-06) may have dropped cipher suites that some clients (old browsers, legacy services) were using.
  5. Certificate validity: openssl s_client -connect alb-dns:443 — verify the certificate chain is complete, cert is not expired, and the SAN matches the hostname.
  6. ACM certificate: if using ACM, check if the cert was recently renewed and the ALB has the new cert ARN configured.
  7. Intermediate certificate issue: ALB must present the full chain. Check if the intermediate cert is included.
  8. Fix: if cipher policy is the issue, revert to a broader policy or coordinate client updates. If cert chain is broken, re-import the full chain to ACM.

Autoscaling isn't kicking in despite the CPU crossing the threshold. What's broken — metrics, HPA, or API server?

Show the answer

Systematic isolation:

  1. Check HPA status:
kubectl describe hpa myapp

Look for: Unable to fetch metrics, unknown, or the current/target metric values.

  1. Metrics Server health:
kubectl top pods -n kube-system   # should work
kubectl get apiservice v1beta1.metrics.k8s.io -o yaml   # check Available: true

If Metrics Server is unavailable, HPA can't get CPU data.

  1. HPA logs and events: kubectl get events | grep HPA.
  2. CPU metrics vs limits: HPA uses cpu usage / cpu request ratio, NOT raw CPU. If pods have no resources.requests.cpu set, HPA can't calculate utilization percentage — configure requests.
  3. Cooldown / stabilization window: HPA has a 5-minute scale-down stabilization; for scale-up it should be immediate. Check scaleUp.stabilizationWindowSeconds.
  4. API server: kubectl get --raw /apis/metrics.k8s.io/v1beta1/nodes — if this times out, the aggregation layer or Metrics Server is broken.
  5. Fix: ensure Metrics Server is running, pods have resource requests set, and the HPA threshold is realistic (not set to 0 or 100%).

Prod users reporting 504s, but ELB health checks are green. Explain your isolation + triage process.

Show the answer

Green health checks mean the backend is accepting connections, but 504 = upstream timeout. The issue is between the ALB and the application response time.

Triage:

  1. ALB access logs: filter for 504 status codes. Check target_processing_time — if it's close to or exceeds the ALB idle timeout (default 60s), that's the culprit.
  2. Target response time: check ALB CloudWatch metric TargetResponseTime — is it spiking?
  3. Connection draining: if a deploy is happening, old targets may be draining while new ones are starting.
  4. Backend application: 504 from ALB means the target didn't respond within idle_timeout.timeout_seconds. Check application logs for slow queries, DB connection pool exhaustion, or deadlocks.
  5. Database: check RDS CloudWatch for DatabaseConnections, ReadLatency, WriteLatency. A slow DB query can cascade to 504s.
  6. Thread pool / connection pool exhaustion: if all application threads are busy (e.g., waiting for a slow downstream service), new requests time out.
  7. Downstream API timeout: if your app calls an external API that's slow, increase your internal timeout or implement circuit breakers.
  8. Fix: increase ALB idle timeout if processing is inherently slow, optimize slow queries, scale application horizontally, implement async processing for long-running tasks.

8 more in the member app, with practice sets and your own marks. Join free

More topics

Other interview topics.