AI Infra Interviews logo

Modal Coding for Infra interview questions

Modal’s cold-start guidance gives useful context for initialization code. Preparation can focus on making setup bounded, repeatable and separate from request-specific work. Questions tagged to Modal appear first, followed by additional practice from our Coding for Infra track. Company tags indicate preparation relevance, not confirmed interview appearances. Confirm the current interview format with your recruiter.

Implement safe lazy initialization

  1. Coordinate the first callers. Define what happens when several requests arrive before a model is ready. Share one initialization attempt, bound waiting and return a clear failure if setup cannot complete.
  2. Prevent stale state from crossing requests. Separate immutable loaded artifacts from mutable request data. Test cancellation and a failed first initialization before optimizing reuse. Reusing a process must not reuse another customer’s state.

Sources: Modal cold-start performance. Reviewed .

Start with the first company-tagged practice question · Continue through the full topic track. Check each resource’s access level.

Coding for Infra questions tagged to Modal

2 questions · 1 unlocked for you

Additional Coding for Infra practice

These questions cover the same topic and are not tagged to Modal. Use them to practise applying the ideas in a different situation.

15 questions · 9 unlocked for you

Concepts for Coding for Infra preparation

These concept explanations cover the ideas used in the questions. Check each card for its access level.

Foundational
The GPU Credit Scheduler PatternA credit scheduler admits jobs without overspending an account’s balance. Clear state transitions make priority, cancellation and refunds easier to implement correctly.
Core
Sign in
Rate-Limiting AlgorithmsRate limiters control how much work a caller may submit over time. Token buckets, queues and sliding windows allow different burst and waiting behavior.
Advanced
🔒 Premium
Batching Queues and BackpressureA request batcher groups work to reduce processing overhead. Queue bounds, dispatch timing and failure handling keep that efficiency from becoming uncontrolled waiting.
Core
Sign in
Retry, Backoff and IdempotencyRetries can recover transient failures, but they also add load and may repeat side effects. Backoff, retry budgets and idempotency make that behavior explicit.
Advanced
🔒 Premium
Interval Merging and Utilization LogsInterval merging finds periods of activity and gaps between them. A sweep over start and end events also measures concurrency and utilization.
Advanced
🔒 Premium
Concurrency in Python, Go and C++Concurrency primitives coordinate overlapping work and shared state. Choose threads, processes or asynchronous tasks from the runtime and the work they must perform.
Advanced
🔒 Premium
Producer-Consumer PipelinesProducer-consumer pipelines connect stages that run at different rates. Bounded buffers absorb temporary variation, while the slowest sustained stage limits throughput.
Advanced
🔒 Premium
Parsing Kernel Traces and LogsTrace analysis combines parsing, classification and aggregation. Stream large inputs and define the timing metric before deciding which operations dominate.
MODAL CODING FOR INFRA FAQ

This collection includes practice questions such as "Implement a cache for model weights on a serving node. What makes it different from a normal LRU?", "Compute per-tenant GPU-hours for a billing period from a log of allocation start and stop events.", "Implement a scheduler that admits jobs by priority and preempts lower-priority work when it must. What are the rules?". Company tags describe relevance to preparation; they do not confirm that Modal asked these questions. Check each question for answer access.

Other topics for Modal preparation

Explore the other topics mapped to Modal in our preparation guide.

Continue your Modal interview preparation

Continue with related questions and the concept curriculum. Free questions are available in every track; check pricing for full access.

Independent and not affiliated with Modal. All trademarks belong to their owners.