~/talk

Mistakes and Trade-offs when optimizing the hot-path

links:none on file
slides:none on file

Shows how to find and fix the actual hot path: assume word_of_day = 1 rps and word_exists = 20 rps, measure p99s with Gatling and internal timers (metrics endpoint), find load_file p99 ~7 ms but scan p99 ~5 s, and then implement a static lookup cache (using Guava cache). Rebench with JMH and Gatling: word_exists p99 drops to ~65 ms (≈80× faster), system workload share falls from ~99.7% to ~79%, demonstrating measurable, validated tradeoffs.

AI-written summary · about

  1. 0:00Intro
  2. 0:46Mistakes and Trade-offs
  3. 1:35When Premature Optimisation is evil?
  4. 3:48Accounts processing logic
  5. 7:18Hidden complexities
  6. 7:48Split phase - is it worth it?
  7. 8:30Benchmark the performance optimization
  8. 9:58Baseline vs parallel
  9. 11:37Lessons learned
  10. 13:46Understanding hot-path in your code
  11. 18:51The Pareto principle in the context of software systems
  12. 21:03Configuring number of concurrent users(threads) for a given SLA
  13. 21:33One-thread scenario
  14. 22:22Divide stress test traffic to N nodes
  15. 23:12Multiply by some factor to allocate threads for outliers
  16. 24:47Service with a potential hot-path
  17. 25:43WordService interface
  18. 29:05Detecting the hot-path in your code
  19. 29:59Getting word of the day performance scenario
  20. 31:04Words used for performance testing
  21. 31:41Validate the word performance scenario
  22. 32:01Setup traffic according to SLA
  23. 33:33Calculating impact of the hot-path optimisation
  24. 35:41Measuring code using Metrics
  25. 36:55load measurements
  26. 39:20Optimize word-exists using Cache
  27. 41:10Re-run Gatling tests
  28. 41:38Recalculate the hot-path
  29. 42:37The percentage of traffic generated by both endpoints
  30. 43:47Further improvements (assuming 10%)
  31. 44:55Check out my book
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.