What Is A Transaction?
A transaction in LoadStrike is the full workflow you care about, not just one request. Read this page first if your workload crosses systems.
Matching docs
Search across docs titles, summaries, groups, and section headings.
Use Up and Down Arrow to move through results, then press Enter to open the active page.
No indexed docs matched that search. Try a broader term or open the docs hub.
What this page helps you do
What this page helps you do
Understand when a plain request-step scenario stops being enough and a correlated transaction model becomes the better fit.
Who this is for
Teams evaluating whether their performance question is really about full workflow completion across systems.
Prerequisites
- A baseline scenario or workflow that may cross more than one boundary or completion point
By the end
A clear mental model for deciding what should count as the start, completion, and reporting scope of your test.
Choose this path when
Start here when the workflow matters more than the first request and you need a shared language for what “complete” means under load.
Visual guide
Guide
Definition
In LoadStrike, a transaction is the business workflow that matters to the team. It might start at an API edge, continue through Kafka or another transport, and finish only when the downstream work proves the outcome really happened.
Why It Matters
A basic request-step scenario is the right starting point, but a fast first request does not always mean the system stayed healthy. Transaction testing keeps the full workflow together so you can see whether queues, workers, follow-on services, and browser steps still complete correctly under load.
How LoadStrike Models It
Start with a scenario and named steps. When the path crosses systems, add source and destination endpoints plus the shared tracking field so LoadStrike can correlate those events and report the whole outcome as one performance story.
Concept and scenario samples
Use these examples to see how LoadStrike moves from a plain request-step scenario into a correlated workflow once the business outcome completes in another system.
If you run these examples locally, add a valid runner key before execution starts. Set it with WithRunnerKey("...") or the config key LoadStrike:RunnerKey.
Transaction Example
using LoadStrike;
var source = new HttpEndpointDefinition
{
Name = "orders-api",
Mode = TrafficEndpointMode.Produce,
TrackingField = TrackingFieldSelector.Parse("header:X-Correlation-Id"),
Url = "https://api.example.com/orders",
Method = "POST",
MessagePayload = new { orderId = "ord-1001", amount = 49.95m }
};
var destination = new KafkaEndpointDefinition
{
Name = "orders-completed",
Mode = TrafficEndpointMode.Consume,
TrackingField = TrackingFieldSelector.Parse("header:X-Correlation-Id"),
BootstrapServers = "localhost:9092",
Topic = "orders.completed",
ConsumerGroupId = "loadstrike-orders"
};
var tracking = new CrossPlatformTrackingConfiguration
{
Source = source,
Destination = destination,
RunMode = TrackingRunMode.GenerateAndCorrelate,
CorrelationTimeout = TimeSpan.FromSeconds(30)
};
var scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.Empty("orders-http-to-kafka"), tracking)
.WithLoadSimulations(
LoadStrikeSimulation.Inject(10, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(20))
);
LoadStrikeRunner.RegisterScenarios(scenario)
.WithRunnerKey("rkl_your_local_runner_key")
.Run();
package main
import loadstrike "loadstrike.com/sdk/go"
func main() {
payload, _ := loadstrike.RawPayloadFromAny(map[string]any{
"orderId": "ord-1001",
"amount": 49.95,
})
tracking := &loadstrike.TrackingConfigurationSpec{
RunMode: "GenerateAndCorrelate",
CorrelationTimeoutSeconds: 30,
Source: &loadstrike.EndpointSpec{
Kind: "Http",
Name: "orders-api",
Mode: "Produce",
TrackingField: "header:X-Correlation-Id",
MessagePayload: payload,
HTTP: &loadstrike.HTTPEndpointOptions{
URL: "https://api.example.com/orders",
Method: "POST",
},
},
Destination: &loadstrike.EndpointSpec{
Kind: "Kafka",
Name: "orders-completed",
Mode: "Consume",
TrackingField: "header:X-Correlation-Id",
Kafka: &loadstrike.KafkaEndpointOptions{
BootstrapServers: "localhost:9092",
Topic: "orders.completed",
ConsumerGroupID: "loadstrike-orders",
},
},
}
scenario := loadstrike.CreateScenario("orders-http-to-kafka", func(loadstrike.LoadStrikeScenarioContext) loadstrike.LoadStrikeReply {
return loadstrike.OK()
}).
WithTrackingConfiguration(tracking).
WithLoadSimulations(loadstrike.LoadStrikeSimulation.Inject(15, loadstrike.DurationFromSeconds(1), loadstrike.DurationFromSeconds(30)))
loadstrike.RegisterScenarios(scenario).
WithRunnerKey("rkl_your_local_runner_key").
Run()
}
import com.loadstrike.runtime.CrossPlatformScenarioConfigurator;
import com.loadstrike.runtime.CrossPlatformTrackingConfiguration;
import com.loadstrike.runtime.HttpEndpointDefinition;
import com.loadstrike.runtime.KafkaEndpointDefinition;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeRunner;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeScenario;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeSimulation;
import com.loadstrike.runtime.LoadStrikeCorrelation.TrackingFieldSelector;
import com.loadstrike.runtime.LoadStrikeTransports;
var source = new HttpEndpointDefinition();
source.name = "orders-api";
source.mode = LoadStrikeTransports.TrafficEndpointMode.Produce;
source.trackingField = TrackingFieldSelector.parse("header:X-Correlation-Id");
source.url = "https://api.example.com/orders";
source.method = "POST";
source.messagePayload = java.util.Map.of("orderId", "ord-1001", "amount", 49.95);
var destination = new KafkaEndpointDefinition();
destination.name = "orders-completed";
destination.mode = LoadStrikeTransports.TrafficEndpointMode.Consume;
destination.trackingField = TrackingFieldSelector.parse("header:X-Correlation-Id");
destination.bootstrapServers = "localhost:9092";
destination.topic = "orders.completed";
destination.consumerGroupId = "loadstrike-orders";
var tracking = new CrossPlatformTrackingConfiguration();
tracking.source = source;
tracking.destination = destination;
tracking.runMode = LoadStrikeTransports.TrackingRunMode.GenerateAndCorrelate;
tracking.correlationTimeout = java.time.Duration.ofSeconds(30);
var scenario = CrossPlatformScenarioConfigurator.Configure(
LoadStrikeScenario.empty("orders-http-to-kafka"),
tracking
).withLoadSimulations(LoadStrikeSimulation.inject(10, 1d, 20d));
LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
from loadstrike_sdk import (
CrossPlatformScenarioConfigurator,
HttpEndpointDefinition,
KafkaEndpointDefinition,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
TrackingFieldSelector,
)
source = HttpEndpointDefinition(
name="orders-api",
mode="Produce",
tracking_field=TrackingFieldSelector.parse("header:X-Correlation-Id"),
url="https://api.example.com/orders",
method="POST",
message_payload={"orderId": "ord-1001", "amount": 49.95},
)
destination = KafkaEndpointDefinition(
name="orders-completed",
mode="Consume",
tracking_field=TrackingFieldSelector.parse("header:X-Correlation-Id"),
bootstrap_servers="localhost:9092",
topic="orders.completed",
consumer_group_id="loadstrike-orders",
)
tracking = {
"RunMode": "GenerateAndCorrelate",
"CorrelationTimeoutSeconds": 30,
"Source": source,
"Destination": destination,
}
scenario = (
CrossPlatformScenarioConfigurator.Configure(
LoadStrikeScenario.empty("orders-http-to-kafka"),
tracking,
)
.with_load_simulations(LoadStrikeSimulation.inject(10, 1, 20))
)
LoadStrikeRunner.register_scenarios(scenario) \
.with_runner_key("rkl_your_local_runner_key") \
.run()
import {
CrossPlatformScenarioConfigurator,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
TrackingFieldSelector
} from "@loadstrike/loadstrike-sdk";
const tracking = {
RunMode: "GenerateAndCorrelate",
CorrelationTimeoutSeconds: 30,
Source: {
Kind: "Http",
Name: "orders-api",
Mode: "Produce",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
Url: "https://api.example.com/orders",
Method: "POST",
MessagePayload: { orderId: "ord-1001", amount: 49.95 }
},
Destination: {
Kind: "Kafka",
Name: "orders-completed",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
BootstrapServers: "localhost:9092",
Topic: "orders.completed",
ConsumerGroupId: "loadstrike-orders"
}
};
const scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.empty("orders-http-to-kafka"), tracking)
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
const {
CrossPlatformScenarioConfigurator,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
TrackingFieldSelector
} = require("@loadstrike/loadstrike-sdk");
(async () => {
const tracking = {
RunMode: "GenerateAndCorrelate",
CorrelationTimeoutSeconds: 30,
Source: {
Kind: "Http",
Name: "orders-api",
Mode: "Produce",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
Url: "https://api.example.com/orders",
Method: "POST",
MessagePayload: { orderId: "ord-1001", amount: 49.95 }
},
Destination: {
Kind: "Kafka",
Name: "orders-completed",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Header", "X-Correlation-Id"),
BootstrapServers: "localhost:9092",
Topic: "orders.completed",
ConsumerGroupId: "loadstrike-orders"
}
};
const scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.empty("orders-http-to-kafka"), tracking)
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
})();
Transaction parts
Define where the workflow starts and where downstream completion becomes visible.
Point both sides at the same business identifier so correlation can match the workflow correctly.
Choose the tracking run mode that matches whether LoadStrike generates the source traffic or only observes existing traffic.
Set the window for when a source action should still count as complete or timed out.