Skip to main content

Session Handling

Front end applications and APIs typically have back and forth conversations that can be grouped into sessions. Speedscale automatically tracks sessions for common patterns like OAuth2. If Speedscale detects a session it will assign a session ID to each RRPair involved in the conversation during capture for easy sorting/filtering. During replay, sessions are handled automatically.

Session detection​

In many cases, sessions are automatically detected and given a unique identifier matching some aspect of the traffic. As an example, consider an OAuth2 login. Open the login RRPair from the snapshot's Traffic tab and its Response body shows an access_token like this:

The Response Body tab of a POST /oauth2/v1/token RRPair, with an access_token and a token_type of Bearer

Now choose More > Info on that same RRPair. You can tell that Speedscale detected this token because it uses the token as the Session ID.

The Info view of the same RRPair, where the Session ID row holds the access_token value

When a snapshot is created data about the sessions will be aggregated into a summary. The list of detected tokens/sessions can be viewed from the snapshot's ⋮ menu with View Tokens:

The Tokens panel, with Unrecognized, Email, UUID, JWT and Datetime token groups and the location of each token

Replay​

During replay, Speedscale will automatically replace session IDs with their new value as returned by the server. When the load generator "logs in" it will expect the server to produce a new access_token response. Speedscale will detect and re-use that token wherever it is used in subsequent calls.

Rotate a population under load​

A session load group selects a population of recorded actors and replays complete journeys. Population size is separate from concurrency and session starts per second. See endpoint and session load plans for rotation, budgets and endpoint-specific goals within a journey.

Loading search...