Parallel Processing
Synode uses lanes to run multiple simulated user sessions concurrently within a single thread.
Lanes
Lanes are fixed execution slots in the tick-based simulator. At each tick, every active lane advances any user that is ready to act. When a lane's user finishes all their journeys, the next user from the pool is assigned to that lane.
import { generate } from '@synode/core';
await generate(journey, {
time: { duration: '7d' },
simulation: {
users: 10000,
lanes: 8, // 8 lanes run concurrently each tick
tick: '15m',
},
});All lanes share the same dataset memory. Each lane has its own isolated user context.
Choosing a Lane Count
| Scenario | Suggested lanes |
|---|---|
| Quick prototyping / small runs | 2–4 |
| Standard generation | 4–8 |
| Large runs (100k+ users) | 8–16 |
More lanes means more users progress per tick, which increases throughput. The upper limit is practical memory — each lane holds an active user context.
Scatter
The scatter option adds random timing variation so users don't all start on exact tick boundaries. A scatter of 0.15 randomizes each user's start time by up to ±15% of one tick interval.
await generate(journey, {
time: { duration: '30d' },
simulation: {
users: 5000,
lanes: 4,
tick: '1h',
scatter: 0.15, // ±15% per tick — avoids timestamp clustering
},
});Time Windows
Specify when the simulation takes place using the time option. See the Simulation guide for all six valid time window combinations.
// Fixed window
await generate(journey, {
time: { start: new Date('2026-01-01'), duration: '90d' },
simulation: { users: 50000, lanes: 8, tick: '1h' },
});
// Rolling window (duration only — ends at now)
await generate(journey, {
time: { duration: '30d' },
simulation: { users: 10000, lanes: 4, tick: '30m' },
});Debug Telemetry
Enable debug to collect detailed metrics about the generation run. Saves a JSON report to telemetryPath.
await generate(journey, {
time: { duration: '7d' },
simulation: { users: 5000, lanes: 4, tick: '15m' },
debug: true,
telemetryPath: './telemetry.json',
});Default telemetry path: ./telemetry-report.json.
The telemetry report includes:
- Total events generated
- Users started/completed
- Duration and throughput
- Event validation summary (if schemas configured)
