~/talk

In Memory of Travails

Talkat GraphQLConf 2024 · on Tuesday, 2024-09-10· at 14:10· Skyline B-C - Level 21· [web-performance]
slides:none on file

Node.js GraphQL subscriptions hit V8 OOM with thousands of connections; a local test with 4000 websockets delivered 16k Kafka messages in ~4.5 minutes as the baseline. Improvements include lazy-loading context objects via Proxy, memoizing repeated snake_case conversions, replacing lodash/Maps with in-place loops, compiling server code for Node 20, adding a subscription query cache and graphql-jit, and autoscaling plus nightly restarts. Instrumentation uses Heap snapshot diffs and Node Clinic; end result shows up to 6.3x speedup and much lower memory plateaus.

AI-written summary · about

  1. 0:00Introduction to GraphQL server
  2. 1:04Problem with memory limits
  3. 3:32Lazy loading backend contexts
  4. 4:36Modernizing key conversion code
  5. 5:42GraphQL subscription mechanics
  6. 6:26Upgrading GraphQL engine
  7. 6:48Caching snake case conversions
  8. 7:51Horizontal Pod Autoscaling setup
  9. 9:14Optimizing Node.js compilation
  10. 10:18In-place array mutations
  11. 11:43Heap profiling techniques
  12. 13:08Removing location nodes
  13. 13:52Lazy data loaders
  14. 16:00Query cache implementation
  15. 17:24GraphQL JIT for large queries
  16. 18:28Memory usage improvements
  17. 18:49In-memory PubSub exploration
  18. 21:13Realistic load testing
  19. 21:34Key insights from optimization
  20. 22:59Q&A and closing remarks
~/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.