stormbreaker-rest
Load through a service’s front door: a stream’s records become HTTP requests to a service axx’s rest pack declared, sent open-model at a declared arrival rate, and what the client saw is recorded as the client view. Builds on stormbreaker-core (list it in axx-packs.yaml): binding a stream declares the identities it will create before anything is sent.
Add it
Section titled “Add it”List it in the project’s axx-packs.yaml, with the packs it builds on:
packs: - rest - github.com/nimbusxr/stormbreaker/packs/core@v0.1.0 - github.com/nimbusxr/stormbreaker/packs/rest@v0.1.0Settings
Section titled “Settings”In axx.yaml, under packs.stormbreaker-rest:
| Setting | What it is |
|---|---|
connections |
reuse (the default) keeps a pool of connections open, which a load balancer spreads across the service’s replicas as it spreads its users’; fresh opens one for each request, and runs out of the machine’s ports past a few thousand requests a second. |
maxConnections |
How many connections to the service may be open at once (default 512): past it, requests wait for one, and their latency says so. |
maxDrift |
How late requests may leave their due time, for five seconds in a row, before the load stops, failing because the driver is not keeping up (default 1s; off turns it off). |
maxInFlight |
How many requests may be in flight before the load stops, failing because the service is not keeping up (default 50000). |
timeout |
How long a request may take (default 30s). |
stormbreaker.rest.stream
Section titled “stormbreaker.rest.stream”Given the {word} stream of {word} requests to {word}[[ on {service}]]Bind a stream (<name>.stream.yaml) to an endpoint: each record’s data is a request’s JSON body. Binding declares every identity the stream will create, at the service and path, before anything is sent. The path can name variables, {name}, filled from the record’s metadata.
Given the parcels stream of POST requests to /parcelsGiven the collections stream of POST requests to /parcels/{reference}/collection on parcelsstormbreaker.rest.stream.path-variables
Section titled “stormbreaker.rest.stream.path-variables”Given the {word} stream path variables are the {word} metadataTake each request’s path variables from a metadata entry of its record: a map, by name.
stormbreaker.rest.stream.query-parameters
Section titled “stormbreaker.rest.stream.query-parameters”Given the {word} stream query parameters are the {word} metadataTake each request’s query parameters from a metadata entry of its record: a map, by name.
stormbreaker.rest.stream.headers
Section titled “stormbreaker.rest.stream.headers”Given the {word} stream headers are the {word} metadataTake each request’s headers from a metadata entry of its record: a map, by name.
stormbreaker.rest.stream.path-variable
Section titled “stormbreaker.rest.stream.path-variable”Given the {word} stream path variable {word} is {string}Give every request of the stream the same path variable, over what its record says. It is text: one that reads as a number or a boolean goes in double quotes inside the step’s own ('"42"').
stormbreaker.rest.stream.query-parameter
Section titled “stormbreaker.rest.stream.query-parameter”Given the {word} stream query parameter {word} is {string}Give every request of the stream the same query parameter, over what its record says. It is text: one that reads as a number or a boolean goes in double quotes inside the step’s own ('"42"').
stormbreaker.rest.stream.header
Section titled “stormbreaker.rest.stream.header”Given the {word} stream header {word} is {string}Give every request of the stream the same header, over what its record says. It is text: one that reads as a number or a boolean goes in double quotes inside the step’s own ('"42"').
stormbreaker.rest.identified
Section titled “stormbreaker.rest.identified”Given the requests[[ on {service}]] are identified by {word}Declare the identities in the payloads of the requests written by hand (with the rest pack’s steps) before each is sent: the values at the JSON paths given, comma-separated.
Given the requests are identified by $.referenceGiven the requests on parcels are identified by $.reference,$.pieces[*].idstormbreaker.rest.stream.execute
Section titled “stormbreaker.rest.stream.execute”When the {word} stream is sent at {int} requests per secondSend the stream’s requests open-model: request i is due at i/rate seconds, however the ones before it are doing.
When the parcels stream is sent at 25 requests per secondstormbreaker.rest.send
Section titled “stormbreaker.rest.send”When {int} {word} requests are sent to {word} at {int} requests per second[[ on {service}]]Send requests without bodies, open-model, at the rate given.
When 100 GET requests are sent to /ping at 50 requests per secondstormbreaker.rest.no-failures
Section titled “stormbreaker.rest.no-failures”Then the load completes with no failed requestsCheck that no request of the last load failed: none went unanswered, and none was answered 400 or over.
Then the load completes with no failed requestsstormbreaker.rest.client-quantile
Section titled “stormbreaker.rest.client-quantile”Then the client's {word} latency of the load is at most {float} secondsCheck a latency quantile of the last load as the client saw it (p50, p99, p99.9): the client view, which is labelled apart from what the service’s metrics say.
Then the client's p99 latency of the load is at most 0.5 seconds