Rate Limiting: Token Bucket vs Sliding Window, With a Java Model You Can RunSame traces, limit 10 per 1000 ms: a 20-request burst allowed 10 on all four. At the window boundary, fixed-window allowed 20; the sliding counter denied 1 of 21 in a steady 100 ms stream.10 min read·gowthammuthuvel.hashnode.dev13h ago
Catch N+1 Queries in Spring Boot Tests by Asserting the Query CountA naive listing of 10 customers touched lazy orders and used 11 prepared statements and 10 collection fetches. @EntityGraph and JOIN FETCH each used 1 statement and 0 collection fetches.9 min read·gowthammuthuvel.hashnode.dev1ANov 27
React Data Fetching Without Race Conditions: AbortController in useEffectThe naive effect left User 1 on screen after userId flipped from 1 (80 ms) to 2 (10 ms). The same test with AbortController showed User 2 and aborted 1 of 2 requests.11 min read·gowthammuthuvel.hashnode.devNov 24
Stripe Webhooks in Spring Boot: Signatures, Idempotency, Out-of-Order Events20 concurrent deliveries of the same event all returned 200 and applied once. A naive handler returned 200 for invoice.paid arriving first and left invoice_paid=false.14 min read·gowthammuthuvel.hashnode.dev1PNov 20
Redis Cache-Aside in Spring Boot: Measured Latency and Stampede FixesA cache hit took 2.24 ms vs 53.54 ms, yet 100 concurrent misses made 100 DB reads, even with @Cacheable(sync = true). Single flight and a Redis lock fixed it, measured on real Redis.32 min read·gowthammuthuvel.hashnode.devNov 13