Round-Robin Task Assignment
Distribute incoming work evenly across a team by rotating through assignees in order. Simple, predictable, fair — and exactly right when skill is uniform and load balance matters.
On this page
Visual Flow
Rendering diagram…
When to Use This Pattern
Use round-robin when:
- Agents are interchangeable for this work type
- Load fairness is the primary goal
- Simplicity wins over sophistication
- The work is high-volume and low-touch — leads, support triage, inbound forms
Use something smarter (skill-based, workload-aware, territory-based) when the work genuinely varies or agents have different specialties.
How It Works
Keep a cursor pointing at the next assignee. When a task arrives, assign to the cursor's agent and advance the cursor. When it hits the end of the list, wrap around.
The trick: the cursor must be durable. Lose it on restart and you'll double-assign the last task or skip the next one. Put it in a small DB table, a Redis counter, or a single row with SELECT ... FOR UPDATE.
Pure round-robin ignores availability. An agent on vacation will still get every Nth task. Always combine with an "out of office" flag or an active-agent list.
Implementation Guide
Step 1: Define the rotation set
Who's in the rotation today? Pull from your identity/HR system. People on PTO should be skipped, not assigned.
Step 2: Hold the cursor atomically
One agent must advance it at a time. Postgres: UPDATE rotation SET cursor = cursor + 1 RETURNING cursor in a single statement, modulo the list length.
Step 3: Honour uneven capacity
Not all agents work the same hours. A junior agent on 50% should get half the tasks. Weight the rotation: [A, A, B, C] gives A twice the load.
Step 4: Audit the assignments
Every task should record: when assigned, who got it, what the cursor was, who was in the active set. Fairness complaints ("I got 12 tickets, Mark got 4") need a paper trail.
Step 5: Plan overrides
Sometimes you need to skip a specific agent for a specific task ("Anna is already handling the parent ticket for this case"). Design override paths so they don't silently break the rotation.
Tips & Best Practices
- Don't round-robin when skill matters. A pure rotation will route a Spanish-speaking customer's ticket to an English-only agent eventually.
- Reset the cursor on team changes. New hire joins mid-day? Decide explicitly whether they start with the next task or the next full rotation.
- Pair with claim-release. Round-robin assigns; if the assignee can't handle it, a release + re-assign keeps the queue moving.
- Visualise the imbalance. Counts per agent per day. Drift by >20% is worth investigating.
Related patterns
Saga with Compensating Transactions
Coordinate a multi-step business transaction that spans several systems by pairing each step with a rollback action. If a later step fails, run the rollbacks in reverse to restore a consistent state.
State Machine Workflow
Model a business process as a set of defined states with explicit transitions between them. Unlike linear workflows, items can move forwards, backwards, and loop — matching how real business processes actually behave.
Fan-Out / Fan-In
Split a workload into parallel branches, process them simultaneously, then aggregate the results. Dramatically reduces processing time for batch operations.