Overview
Understand the core architecture of LoadStrike and how cross-platform tracking works.
What It Solves
LoadStrike correlates source and destination events across HTTP, Kafka, NATS, Redis Streams, RabbitMQ, Event Hubs, Push Diffusion, and delegate-based custom streams.
How Correlation Works
A shared tracking id is read from headers or body selectors. First match wins, duplicates are counted, and timeout is configurable.
Run Modes
GenerateAndCorrelate and CorrelateExistingTraffic are both supported. Source-only reporting is also available when destination is omitted.
Feature Usage Samples
How to use snippets for Overview.
Switch between C#, Java, Python, TypeScript, and JavaScript to see the native SDK shape for this sample.
Licensing note: every runnable sample requires a valid runner key via WithRunnerKey("...") or config key LoadStrike:RunnerKey.
Minimal Run
var scenario = LoadStrikeScenario.Create("hello", _ => Task.FromResult(LoadStrikeResponse.Ok()))
.WithLoadSimulations(LoadStrikeSimulation.Inject(5, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(10)));
LoadStrikeRunner.RegisterScenarios(scenario).WithRunnerKey("rkl_your_local_runner_key").Run();
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeResponse;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeRunner;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeScenario;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeSimulation;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeStep;
var scenario = LoadStrikeScenario
.create("orders", context -> LoadStrikeStep.run(
"publish-order",
context,
() -> LoadStrikeResponse.ok("200")
).asReply())
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1d, 20d));
LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
from loadstrike_sdk import (
LoadStrikeResponse,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
LoadStrikeStep,
)
scenario = (
LoadStrikeScenario.create(
"orders",
lambda context: LoadStrikeStep.run(
"publish-order",
context,
lambda: LoadStrikeResponse.ok("200"),
)["as_reply"](),
)
.with_load_simulations(LoadStrikeSimulation.inject(10, 1, 20))
)
result = (
LoadStrikeRunner.register_scenarios(scenario)
.with_runner_key("rkl_your_local_runner_key")
.run()
)
import {
LoadStrikeResponse,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
LoadStrikeStep
} from "@loadstrike/loadstrike-sdk";
const scenario = LoadStrikeScenario
.create("orders", async (context) => {
return LoadStrikeStep.run(
"publish-order",
context,
async () => LoadStrikeResponse.ok("200")
);
})
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
const result = await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
const {
LoadStrikeResponse,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
LoadStrikeStep
} = require("@loadstrike/loadstrike-sdk");
(async () => {
const scenario = LoadStrikeScenario
.create("orders", async (context) => {
return LoadStrikeStep.run(
"publish-order",
context,
async () => LoadStrikeResponse.ok("200")
);
})
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
const result = await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
})();
Flow
Define the workload unit, its run delegate, and any scenario-level hooks or thresholds.
Attach the traffic model that decides how often the scenario runs and for how long.
Register the scenario, provide a valid runner key, and execute to produce runtime stats and reports.