Home › Reference › Components › Worker
Worker
Takes jobs from a queue and does them in the background, a few at a time on each instance.
Settings
- Instance tier
- The machine size of each instance. Bigger tiers give more CPU cores, and set the default jobs per instance. They do not make a single job faster.
- Instances
- How many identical worker copies run. More instances work through the queue's backlog faster, up to the point where the queue is empty.
- Jobs per instance
- How many jobs one instance runs at once. More drains the queue faster but jobs share the instance's CPU cores. Blank uses the tier's core count.
- Time per job
- How long the CPU work for one job takes. Pick the shape: constant, lognormal (mostly fast, some slow), exponential, or uniform.
- Idempotent jobs
- Whether running the same job twice has no extra effect. The queue can deliver a job more than once, so yes means repeats cost work but are not counted as duplicates.
- Failure rate
- The share of jobs that fail after running, from 0 to 1. Failed jobs go back to the queue to retry, then to the dead-letter list when attempts run out.
- Downstream pattern
- The calls each job makes to other components while it runs, for example a database write. The job stays busy until they answer.
- Crashes
- Scheduled crashes to test failure handling. While one is active, the target refuses requests, and anything it was holding is lost.