InterviewStack.io LogoInterviewStack.io

Scalability Patterns and Techniques Questions

Scaling a system to handle growth in traffic and data: horizontal versus vertical scaling, statelessness, sharding and partitioning strategies, read replicas, and connection pooling. Covers capacity estimation, identifying bottlenecks, and the tradeoffs each scaling axis introduces. The general toolkit for taking a design from thousands to millions of users.

HardTechnical
31 practiced

CPU-bound feature computations are the bottleneck in your inference path. Walk through a prioritized plan to address it: precomputing features, using approximate or quantized features, rewriting hot code with vectorized kernels or JIT compilation, and moving heavy transforms to a specialized service. What are the trade-offs in accuracy, staleness, and engineering cost?

EasyTechnical
30 practiced

Describe the different things you might cache in a machine-learning serving stack: prediction results, feature values, and model artifacts. For each, explain what a good cache key looks like, what drives your hit rate, how you'd think about freshness, and how staleness in that cache could affect model quality or business metrics.

EasyTechnical
28 practiced

Compare stateless and stateful approaches to model serving. For an online recommendation model that relies on user session state and short-term interaction history, when would you prefer stateful serving over external state storage? Discuss the implications for scalability, fault tolerance, deployment complexity, and operational cost.

MediumTechnical
28 practiced

You're responsible for capacity planning on a multi-tenant GPU cluster used for both nightly model training and real-time inference. How would you forecast GPU capacity needs over the next 12 months, define quotas and priorities across tenants, design scheduling and preemption policies, and handle bursty demand? What metrics and cost trade-offs matter most here?

HardTechnical
36 practiced

You're designing a cloud-hosted, stateful ML inference service backed by GPUs that must serve real-time predictions with P95 latency under 50ms. Compare vertical scaling (bigger GPU instances) versus horizontal scaling (more replicas, model sharding). Discuss cost per prediction, cold-start and model-loading time, batching opportunities, GPU utilization, autoscaling constraints, and operational complexity. Recommend an architecture.

Unlock Full Question Bank

Get access to all 7 Scalability Patterns and Techniques interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.