Simulation
Simulate traffic flow with dwell time modeling and load curve analysis
Simulation
Model and simulate system behaviors
Archflow's simulation engine lets you model traffic flow through your architecture, identifying bottlenecks and understanding how systems behave under load.
Overview
The simulation engine runs traffic through your workflow steps, applying configurable dwell time (processing delay) and load curves (how systems scale under increasing load) to each element. This reveals which systems become bottlenecks and how your architecture handles varying traffic levels.
Accessing Simulation
Simulation is available on the Explorer canvas. Open the simulation controls to configure and run simulations.
Key Concepts
Dwell Time
The time a request spends being processed at each system or workflow step. Configure dwell time per element:
- Low dwell (e.g., 50ms) --- Fast pass-through services like load balancers
- Medium dwell (e.g., 200ms) --- Typical application processing
- High dwell (e.g., 1000ms+) --- Complex operations like batch processing or ML inference
Load Curves
Load curves model how systems scale as traffic increases:
| Exponent | Name | Behavior |
|---|---|---|
| 0.5 | Scales Well | Response time grows slowly with load (e.g., horizontally scaled services) |
| 1.0 | Linear | Response time grows proportionally with load |
| 2.0 | Stampede | Response time grows exponentially (e.g., systems with lock contention) |
Heat Maps
During simulation, the canvas renders a heat map overlay:
- Cool colors (blue/green) --- Systems handling load comfortably
- Warm colors (yellow/orange) --- Systems approaching capacity
- Hot colors (red) --- Bottleneck systems under stress
Traffic Metrics
Edge utilization is visualized on connections:
- Thicker edges indicate higher traffic volume
- Color-coded to show utilization level
- Helps identify heavily-used integration paths
Running a Simulation
1. Configure
Open the Simulation Config Dialog to set parameters:
- Number of concurrent instances
- Simulation duration
- Per-element dwell time and load curve exponents
2. Control
Use the Simulation Control Panel to:
- Start the simulation
- Pause and resume as needed
- Adjust speed during runtime
- Stop to end the simulation
3. Monitor
The Simulation Stats Panel shows real-time metrics:
- Active instances at each system
- Completion rates
- Current bottleneck identification
- Edge utilization percentages
4. Report
After the simulation completes, generate a Simulation Report with:
- Summary statistics (total instances, completions, average time)
- Bottleneck identification with severity ranking
- Per-system performance metrics
- Recommendations for architectural improvements
Use Cases
Capacity Planning
Model expected traffic to identify systems that need scaling before going live.
Bottleneck Detection
Find systems that become bottlenecks under load --- especially useful for identifying unexpected hotspots in complex architectures.
Architecture Comparison
Run simulations on different architecture versions to compare how changes affect performance under load.
Incident Analysis
After a production incident, model the traffic pattern to understand which system was the bottleneck.