Skip to content

[ISSUE #54] Measure hot-key segment sizing and shutdown gaps - #75

Merged
mxsm merged 1 commit into
developfrom
mxsm/fix-27-segment-sizing
Nov 28, 2026
Merged

mxsm merged 1 commit into
developfrom
mxsm/fix-27-segment-sizing

Conversation

@mxsm

@mxsm mxsm commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Closes #54

Add a reproducible Docker-backed hot-key experiment, the individual trial results and a conditional registration example. The probe creates isolated MySQL 8.4 or PostgreSQL 18 instances. It verifies the HTTP envelope and integer identity, counts successful writer reservations and queries the stored exclusive cursor after controlled shutdown.

Validation

  • Measured commit 8289a31 after both segment refill corrections. Eighteen equal-length 10,000-ID trials covered steps 1, 32 and 1000. Six additional 50,000-ID trials exercised repeated refill at step 1000. Each trial used 32 workers and identical authentication and cache settings. All 480,000 measured calls succeeded, with no duplicate within a business key.
  • At step 32, each database used 32 writer reservations per 10,000 successes and left 432 IDs unused on the stopped replica. PostgreSQL p99 was 3.316–7.577 ms, while MySQL p99 was 16.040–34.940 ms.
  • At step 1000 the short window fit inside the initial reservation. Each longer trial made five reservations, issued 50,000 IDs and left 6,000 unused. Each database had one longer trial above 10 ms p99.
  • The guide distinguishes rejected prefetch ranges, outstanding IDs at shutdown and normalized rates. It proposes adoption only with an explicit business gap budget and successful deployment-specific tail-latency checks.

@mxsm
mxsm merged commit 528aaec into develop Nov 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Measure and document segment sizing for a hot business code

1 participant