~/talk

API Optimization Tale: Monitor, Fix and Deploy (on Friday)

Talkat Build Stuff 2022 · 2022-11-09..11-11· [ruby-on-rails, graphql]
links:none on file
slides:none on file

A green Jenkins build gets pushed Friday to test a billing extraction from a Rails monolith and exposes a REST API that collapses under small traffic; a move to GraphQL plus feature flags and detailed per-request logging (method, args, stack trace, timings) enables reproducing hotspots. Fixes include batching to replace thousands of N+1 external calls with a single fetch and index (batch-fetch and index), switching a frequently read field to a local read model instead of Kafka, fixing an overzealous sanitization that caused a 10x memory spike and a 1‑minute Postgres query, and finally adding spread/jitter and a Sidekiq limiter so the changes actually hold.

AI-written summary · about

  1. 0:00Introduction and speaker welcome
  2. 3:39Project background and monolith challenges
  3. 8:16Safe extraction with feature flags
  4. 11:47Monitoring and feedback loop setup
  5. 17:50Optimizing N+1 queries with caching
  6. 23:55Production incident and recovery
  7. 27:35Ongoing issues and time zone spikes
  8. 30:27Confidence in Friday deployments
  9. 35:11Key learnings and takeaways
  10. 41:46Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.