Skip to main content

RandomLoadBalancer

Returns true probabilistically — use to distribute traffic across two connectors at a configured ratio. Shown as "Load Balance by Random" in the condition catalogue.

Parameters

FieldTypeRequiredAllowed values
percentTrueintegeryesExpects values from 0 to 100 — the percentage of transactions for which the rule returns true

Example

A 70 / 30 split between two connectors:

{
"id": null,
"if": {
"constraint": "RandomLoadBalancer",
"params": { "percentTrue": 70 }
},
"then": { "id": null, "route": { "connector": "CO-PRIMARY-..." } },
"else": { "id": null, "route": { "connector": "CO-SECONDARY-..." } }
}

Notes

  • Availability: might not be included in your platform package — if this condition is missing from the catalogue returned by List routing constraints, contact your Customer Success Manager to have it activated.
  • The split is approximate. 100 always routes to the then branch; a value of 0 does not fully exclude the then branch — to send no traffic to a connector, remove the rule instead of setting 0.
  • Each transaction is evaluated independently — there is no session affinity.
  • Available for routing meta-connectors only — not in multi-method routing documents.