Design a Distributed Job Queue for Cloud Scanning
Last updated: December 9, 2025
Quick Overview
Design a job queue system that schedules and executes cloud scanning tasks across multiple regions and cloud providers with priority management, tenant isolation, and failure recovery.
Wiz
December 9, 202514
7
4,815 solved
Design a job queue system that schedules and executes cloud scanning tasks across multiple regions and cloud providers with priority management, tenant isolation, and failure recovery.
Wiz's scanning infrastructure processes millions of scan jobs daily across thousands of tenants. The job queue must handle diverse scan types (vulnerability scans, configuration checks, secret detection) with different priority levels, ensure fair resource allocation across tenants, and recover gracefully from failures.
What the Interviewer Expects
- Design a priority-aware distributed job queue with tenant fairness
- Handle job scheduling, execution, retry, and dead-letter processing
- Implement rate limiting per cloud provider and per tenant
- Ensure exactly-once or at-least-once execution semantics
- Monitor job health with alerting on stuck or failing jobs
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How would you prevent a single large tenant from starving smaller tenants?
- What happens when a worker crashes mid-job? How do you avoid duplicate work?
- How would you add a new scan type to the system with minimal changes?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Queue Architecture
Use a multi-tier queue system. Each scan type gets its own queue (vulnerability, config, secrets). Within each queue, implement weighted fair queuing ...
Execution and Reliability
Workers pull jobs with a visibility timeout (heartbeat pattern). Workers must heartbeat periodically; if heartbeat stops, the job becomes visible agai...