~/talk

Going Infinite: Handling 1 Million Websocket Connections in Go

Talkat GopherCon UK 2019 · 2019-08-21..08-23· [go, distributed-systems]
speakerdeck:eranyanay
slides:none on file

Shows how a Go HTTP/WebSocket server moves from a goroutine-per-connection design to an epoll-based event loop that drops goroutines, swaps the websocket library for a zero-allocation alternative, and reuses I/O buffers. Uses pprof to find 20 GB of per-connection allocations, raises ulimits and conntrack, and runs clients in separate network namespaces to bypass ephemeral port limits. Result: memory falls to ~600–700 MB and the demo reaches ~260–300k live sockets with paths toward millions.

AI-written summary · about

  1. 0:00Introduction
  2. 0:15Overview
  3. 1:00Hello Handler
  4. 1:35Salvin
  5. 2:01What is Websocket
  6. 2:50How do we do it
  7. 3:13Example
  8. 4:08Demonstration
  9. 5:27Too Many Open Files
  10. 6:15Ulama
  11. 7:54Limit syscall
  12. 8:27Starting a server
  13. 10:39People
  14. 14:56Go Team
  15. 15:24WebSocket Handler
  16. 15:45Future Optimizations
  17. 16:38Neighbor Post
  18. 18:54April
  19. 20:16Buffer Locations
  20. 21:10Gobos
  21. 22:23Demo
  22. 28:01Results
  23. 28:24Summary
~/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.