Build fluency in the vocabulary of background job processing separated from a web server's request cycle.
0 / 5 completed
1 / 5
At standup, a dev mentions a long-running process that continuously pulls jobs off a queue and processes them, separate from the web server handling HTTP requests. What is this service type called?
A background worker service runs continuously, pulling jobs off a queue and processing them independently of the web server that handles incoming HTTP requests, letting time-consuming tasks run without blocking a user's request-response cycle. Separating this workload from the web server keeps the user-facing application responsive even while heavier processing happens elsewhere. This separation of concerns between request handling and background processing is a common architecture pattern for anything beyond simple, fast operations.
2 / 5
During a design review, the team wants a worker service to automatically restart if it crashes while processing a job, without manual intervention. Which capability supports this?
Automatic process supervision and restart detects when a background worker process crashes and brings it back up automatically, rather than leaving the queue unprocessed until a person notices and manually restarts the service. This resilience is important since a worker crash that goes unnoticed can silently stall the entire job queue. Automatic restart is a standard operational safeguard for any continuously running background process.
3 / 5
In a code review, a dev configures a worker to run multiple job-processing instances in parallel to handle a growing queue faster. What does this represent?
Horizontal scaling of worker instances runs multiple copies of the job-processing logic in parallel, letting the system work through a growing queue faster than a single instance could manage alone. This scaling approach adds capacity by adding more workers rather than making one worker more powerful. It requires the underlying job queue and processing logic to safely support multiple workers pulling from the same queue concurrently.
4 / 5
An incident report shows two worker instances both picked up and processed the same job simultaneously, causing a duplicate charge to a customer. What practice would prevent this?
Implementing job locking or designing job processing to be idempotent ensures that even if multiple workers happen to pick up the same job, it can't be fully processed more than once, preventing exactly this kind of duplicate side effect like a double charge. Assuming concurrent workers will never collide on the same job ignores a real race condition that becomes more likely as worker concurrency increases. This safeguard is essential once a queue is being processed by more than a single worker instance.
5 / 5
During a PR review, a teammate asks why the team runs a separate background worker service instead of processing time-consuming jobs directly within the web request handler. What is the reasoning?
Processing a time-consuming task directly within the request handler forces the user to wait for that entire operation to finish before getting a response, which can make the application feel slow or even time out. A separate background worker lets the request return quickly while the heavier processing continues independently. This separation also allows the worker and web server to be scaled independently based on their very different resource needs.