~/talk

Optimizing performance in Rails apps with GraphQL layer

Talkat wroc_love.rb 2024 · 2024-04-12..04-14· [ruby-on-rails, graphql]
slides:none on file

A production Rails API running GraphQL since 2016 uses concrete measures: add Honeycomb/OpenTelemetry tracing to break request time into parse/validate/execute and DB spans; write CI assert_queries tests to catch regressions; fix N+1 with graphql-batch and batch-loader and use graphql-preload or graphql-ruby lookahead to selective preload; apply a custom event-driven fragment cache for costly fields; enable max_depth, per-query timeouts and query batching (multiplex) — these changes reduce DB queries and surface hotspots in monitoring.

AI-written summary · about

  1. 0:00Introduction and background
  2. 16:49Performance testing strategies
  3. 27:38Monitoring GraphQL performance
  4. 34:51Solving N+1 query problems
  5. 41:26Handling concurrency and batching
  6. 46:25Key takeaways and conclusion
~/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.