In this article
Give sequence grouping and per-request correlation distinct identities, with an explicit collision and reuse scope.
A client uses the same value for a Triton request identifier and sequence identifier, then reuses it across every session. Logs remain easy to search, but independent users can be assigned the same stateful sequence. Request correlation and sequence identity have different jobs. Model them separately before adding retries or concurrent sessions.
Assign each identity a purpose
A request identifier associates one inference request with its response and diagnostic records. A sequence identifier groups related requests for a stateful model. Several requests in one sequence therefore share sequence identity while still needing distinct request correlation. Neither field alone defines a global application user identity. Keep the mapping explicit and avoid embedding private user information in identifiers that will appear in operational logs.
Verify supported identifier types
The sequence extension documents numeric identifiers and optional string-identifier support advertised through server metadata. Check that support on the actual server instead of assuming a UUID string works everywhere. Empty or zero identity has a special non-sequence meaning under the contract and should not be used as an accidental default for intended stateful work. Validate type and presence before admitting the application session.
Prevent overlap between active sessions
Allocate identities so independent simultaneously active sequences cannot collide under the application’s scope. A value unique only within one process may collide after scaling to another client instance. Define the allocator’s scope and reuse rule. If a sequence ends, retain enough lifecycle information to avoid assigning its identity to new work while an uncertain old request can still arrive. A new TCP connection does not itself create a new sequence identity.
Preserve retries without inventing deduplication
Repeating a request identifier does not automatically prevent another inference execution. Repeating a sequence identifier can intentionally address the same state, which makes an uncertain retry more consequential. Determine whether the backend operation can be safely repeated and how the application handles a lost response. Keep attempt identity separate where needed. Do not generate a new sequence identity for every retry unless the recovery design intentionally abandons and restarts the stateful workflow.
Test interleaving with visible state
Use two synthetic sessions whose inputs make state carryover easy to detect. Interleave requests, verify each response’s request correlation and confirm that state remains assigned to the intended sequence. Add a client restart and a delayed old attempt in an isolated fixture. Acceptance means a documented identity scope, stable grouping within a session and no cross-session contamination. It does not mean the transport guarantees persistence, authorization or exactly-once updates. Those properties require explicit application and backend mechanisms beyond identifier fields that merely label and group requests.
Primary references
Triton Sequence Extension. Defines sequence identity, empty values and advertised string support.
Triton gRPC service definition. Defines the request identifier returned in the inference response.
KServe Inference Protocol required APIs. Defines request-response correlation independently of server-specific sequence grouping.
Related reading: Handle final completion correctly in Triton decoupled streaming; Retrying generation POSTs: idempotency must be explicit.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.