Node Targeting
Target scenarios per coordinator/agent to model realistic topology.
Scenario Routing
Use coordinator and agent targeting APIs to segment workload responsibilities.
Feature Usage Samples
How to use snippets for Node Targeting.
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.
Target Scenarios Per Node
LoadStrikeRunner
.RegisterScenarios(httpScenario, kafkaScenario)
.WithNodeType(LoadStrikeNodeType.Coordinator)
.WithClusterId("orders-cluster")
.WithAgentsCount(2)
.WithCoordinatorTargetScenarios("http-source")
.WithAgentTargetScenarios("kafka-consumer")
.WithRunnerKey("rkr_your_remote_runner_key")
.Run();
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeNodeType;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeRunner;
LoadStrikeRunner
.registerScenarios(httpScenario, kafkaScenario)
.withNodeType(LoadStrikeNodeType.Coordinator)
.withClusterId("orders-cluster")
.withAgentsCount(2)
.withCoordinatorTargetScenarios("http-source")
.withAgentTargetScenarios("kafka-consumer")
.withRunnerKey("rkr_your_remote_runner_key")
.run();
from loadstrike_sdk import LoadStrikeRunner
LoadStrikeRunner.register_scenarios(http_scenario, kafka_scenario) \
.with_node_type("Coordinator") \
.with_cluster_id("orders-cluster") \
.with_agents_count(2) \
.with_coordinator_target_scenarios("http-source") \
.with_agent_target_scenarios("kafka-consumer") \
.with_runner_key("rkr_your_remote_runner_key") \
.run()
import { LoadStrikeRunner } from "@loadstrike/loadstrike-sdk";
await LoadStrikeRunner
.registerScenarios(httpScenario, kafkaScenario)
.withNodeType("Coordinator")
.withClusterId("orders-cluster")
.withAgentsCount(2)
.withCoordinatorTargetScenarios("http-source")
.withAgentTargetScenarios("kafka-consumer")
.withRunnerKey("rkr_your_remote_runner_key")
.run();
const { LoadStrikeRunner } = require("@loadstrike/loadstrike-sdk");
await LoadStrikeRunner
.registerScenarios(httpScenario, kafkaScenario)
.withNodeType("Coordinator")
.withClusterId("orders-cluster")
.withAgentsCount(2)
.withCoordinatorTargetScenarios("http-source")
.withAgentTargetScenarios("kafka-consumer")
.withRunnerKey("rkr_your_remote_runner_key")
.run();
Targeting Pattern
CoordinatorTargetScenarios
List the scenarios that should stay on the coordinator process.
AgentTargetScenarios
List the scenarios that should be executed by agents instead of the coordinator.
Explicit names
Use explicit scenario names so each role gets a deterministic slice of the workload.