Skip to content

feat(request-id): add UUID v7 support via algorithm uuidv7#13152

Open
shreemaan-abhishek wants to merge 1 commit intoapache:masterfrom
shreemaan-abhishek:backport-pr2-uuidv7
Open

feat(request-id): add UUID v7 support via algorithm uuidv7#13152
shreemaan-abhishek wants to merge 1 commit intoapache:masterfrom
shreemaan-abhishek:backport-pr2-uuidv7

Conversation

@shreemaan-abhishek
Copy link
Copy Markdown
Contributor

@shreemaan-abhishek shreemaan-abhishek commented Apr 3, 2026

Summary

  • Adds UUID v7 (RFC 9562) generation support to the request-id plugin via algorithm: "uuidv7"
  • UUID v7 provides time-ordered, lexicographically sortable IDs with millisecond precision
  • Includes worker-local monotonic sequence to guarantee uniqueness and ordering within a single millisecond

Test plan

  • Schema validation tests (valid/invalid algorithm values)
  • Format validation (version nibble = 7, variant = 8-b)
  • Uniqueness test (180 concurrent requests)
  • Monotonicity test (sequential UUIDs are lexicographically ordered)
  • Timestamp encoding test (48-bit ts non-zero, no LuaJIT truncation)
  • Custom header name support
  • Sequence overflow handling
  • Clock rollback resilience

Backport UUID v7 algorithm from EE (commit 505c12e12) to the
open-source request-id plugin. UUID v7 embeds a 48-bit Unix
millisecond timestamp and an 18-bit monotonic sequence counter,
producing time-ordered, unique identifiers without shared state
across workers.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant