Docs menu
Build a scenario
Scenario file Generators vars and const Time and pace Defaults Relationships Schedules Instances Lifecycle Collections Connections Delivery behaviorBuild a scenario
Defaults
Repeating the same pace, limit, seed, or locale in every generator makes a scenario harder to change. Put shared settings under defaults, then override only the generator that should behave differently.
The result we want
Our marketplace needs two customer events but only one daily promotion:
customers CUST-00
dailyPromotion free-shipping
customers CUST-01
Both generators inherit a limit of two. The promotion replaces its inherited limit with one.
Share settings and override one
Shared defaults with one override
defaults:
seed: 42
faker:
locale: en_GB
maxEvents: 2
generators:
- name: customers
value:
customerId: =seq(format=CUST-%02d)
name: =faker(person.fullName)
- name: dailyPromotion
config:
maxEvents: 1
value:
promotion: free-shipping
market: UK
Press Try it. You should see two customers events and one dailyPromotion event.
defaults.seed: 42repeats calculated random values.defaults.faker.locale: en_GBapplies to every Faker expression.defaults.maxEvents: 2applies to both generators.dailyPromotion.config.maxEvents: 1replaces only that generator’s inherited limit.
The override does not change customers, and it does not replace the seed or Faker locale.
Everything you can set
The entire defaults block is optional. This table shows every supported setting and what Synthtraffic uses when you leave it out.
| Setting | Accepted values | Value when omitted |
|---|---|---|
seed | An integer used for repeatable calculated values | Generates a seed and prints it so you can reuse it |
clock.start | An RFC3339 timestamp such as 2026-03-01T09:00:00Z | The time the command starts |
faker.locale | en_US, en_IN, en_AU, or en_GB | en_US |
rate | unlimited, a value such as 10/s, or an advanced rate-window object | unlimited |
interval | A duration such as 500ms or an expression such as =uniformDuration(100ms, 500ms) | Not set |
maxEvents | A positive event count | 10000 per generator when maxDuration is also omitted |
maxDuration | A positive duration such as 30s or 5m | Not set |
history.maxEvents | A positive retained-event count used by relationships | 100000 per referenced source generator |
delay | Delivery-delay settings | Disabled |
discard | Probabilistic delivery-drop settings | Disabled |
repeat | Probabilistic duplicate-delivery settings | Disabled |
The behavior of rate, interval, and limits is covered in Time and pace. Delay, discard, and repeat are covered in Delivery behavior.
Generator config can replace rate, interval, maxEvents, maxDuration, history, delay, discard, or repeat for that generator. seed, clock.start, and faker.locale apply to the whole scenario.
Make a run repeatable
seed and clock.start repeat different parts of a run:
seedrepeats calculated random values from expressions such asuuid(),faker(), anduniform().clock.startrepeats the first scenario-clock timestamp used bynow().
Set both when random values and timestamps must match:
defaults:
seed: 42
clock:
start: 2026-03-01T09:00:00Z
With the same scenario, seed, and clock start, another run produces the same random choices and the same scenario timestamps. A seed alone does not freeze timestamps because the scenario clock otherwise begins when the command starts.
Choose a Faker locale
faker.locale selects the regional data used by every faker() expression:
en_US— United Statesen_IN— Indiaen_AU— Australiaen_GB— United Kingdom
For example:
defaults:
faker:
locale: en_GB