Scale and contention
How do session input load, snapshot traffic and total capacity differ?
The requirements are tested at a concrete, fictional scale: 32 players per session at 20 inputs/s. Average load, peak load and contention are considered separately.
Starting point Show predictions and confirm rewards only after a durable record exists.
Assumptions for the example case
A fictional example design: one session with at most 32 players, server-authoritative movement, one-time pickup of world items, reconnection within the same session and durably confirmed rewards. Figures and quality goals are illustrative test assumptions. A shared global game world, player trading, paid items and comprehensive fraud detection are outside the scope.
Throughput and the contended resource
Tick budget, total rate and state snapshots
Size tick processing and outgoing bandwidth separately; the crystal remains a local contention point.
Reproducible test profile calculations
- 01
Average load
32 players per session at 20 inputs/s32 × 20 = 640 inputs/s per session
For the designThe rate describes the assumed total volume; response time still requires measurement.
- 02
Peak test
100 sessions × 640 = 64,000 inputs/s as the total peak32 recipients × 10 state snapshots/s × 2 KiB = 640 KiB/s per session before protocol overhead
For the designThe additional quantity calculation defines a separate check of resource or retention needs.
Test concurrency separately
- Test oracle
- P-21 and P-22 send valid pickup commands for G-21 in the same tick. Test both server-side input orders: the first valid command in that order wins; the other receives already allocated. Exactly 1 crystal is awarded in total.
Scale by session
Measure per-session capacity and concurrent session count separately.
640 inputs/s affect the same world.
An overloaded world does not automatically benefit from more free servers.
- Alternative considered
- Global CPU averages alone hide slow ticks.
- Trade-off
- Individual sessions retain a capacity limit.
- Reassess
- Tick processing regularly exceeds 50 ms in the load test.
Terms in this step
- Scale by session
- An overloaded world does not automatically benefit from more free servers.
Try it yourself
Calculate inputs and snapshot payload per session. Explain why 100 additional servers do not automatically fix a slow tick.
A hint for your attempt
Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.
Compare with a possible solution
- First part of the solution
- 32 times 20 gives 640 inputs/s. 32 times 10 times 2 KiB gives 640 KiB/s of outgoing snapshot payload before overhead.
- Second part of the solution
- One authoritative process advances each world. More session servers help other worlds; this session must meet its 50-ms tick budget.
Apply to your project
Which corresponding assumption would you test first in your project? Consider this trigger: Tick processing regularly exceeds 50 ms in the load test.