Design a job service: submit, run, check status, fetch results
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Baseten's technical phone screen. It tests system design, distributed systems and caching.
Design a service that accepts jobs from users, runs them on a pool of workers, and lets users check each job's status and fetch its result. The round is interviewer-led: the interviewer steers you through the fundamentals one at a time (requirements, the high-level architecture, storage, caching, asynchronous work, reliability and observability) and checks that you can reason clearly about each building block when asked, more than that you produce one grand design.
Requirements
- Functional: submit a job, run it, check its status, fetch its result, cancel it.
- Non-functional: agree on numbers early (requests per second, data size, latency targets, availability) and use them in every later choice.
Clarifying questions
- Who uses the system and what are the two or three most important operations?
- What scale should I design for now, and in a year?
- Which matters more for this system: latency, consistency, cost?
- What may be eventually consistent, and what must be exact?
- Are there existing systems or constraints (cloud provider, a database already in use)?
What a strong answer covers
- Requirements turned into numbers with a quick estimate (QPS, storage per year, bandwidth).
- A simple first architecture (clients, load balancer, stateless API servers, database) drawn before optimizing.
- Storage: choosing relational or key-value from the access patterns, the schema and indexes, and when to shard or replicate.
- Caching: what to cache, where (client, CDN, application cache), invalidation and the stampede problem.
- Asynchronous work: queues for slow jobs, at-least-once delivery, idempotent workers, retries with backoff and dead-letter queues.
- Reliability: redundancy across zones, timeouts and circuit breakers, graceful degradation, and what happens when each component fails.
- Observability: metrics, logs and traces, the few alerts that matter, and SLOs.
- Trade-offs named and decided at each step rather than listed.
Follow-ups
- Traffic grows tenfold. Which part breaks first and what do you change?
- A job runs twice because a worker crashed after finishing. How do you make that harmless?
- The cache serves stale data after an update. How do you fix it, and what does it cost?
- How would you know, from the dashboards alone, that users are having a bad time?
Where it's asked
- Baseten · Technical phone screen60 min · Live in CoderPad: a few minutes of intro, then 45 to 50 minutes on one practical problem
What it tests
system design · distributed systems · caching · database
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
