~/talk

Untangling cables and demystifying twisted transistors

Talkat Rails World 2023 · 2023-10-05..10-06· [web-platform, security]
slides:none on file

Action Cable exposes a simple channel API but under the hood it uses an action-cable protocol with a client consumer/subscription model, a monitor that pings every 3s (no pongs) and a server-side 4-thread executor (concurrent-ruby) with an unbounded queue, which causes concurrent processing of commands, race conditions on subscribe/unsubscribe, and nondeterministic broadcast ordering. There are no message IDs or acknowledgements so delivery is at-most-once, missed messages aren’t recoverable, and server restarts can trigger a connection avalanche. Mitigations: randomized reconnects (Rails 7), subscription serialization, size DB pool = web threads + cable threads, or use AnyCable.

AI-written summary · about

  1. 0:00Introduction to rails
  2. 2:37Action cable interface
  3. 5:57Client-side architecture
  4. 9:21Protocol and custom clients
  5. 12:32Handling server failures
  6. 17:28Server-side internals
  7. 22:00Broadcasting mechanisms
  8. 26:27Turbo streams integration
  9. 29:46Connection avalanche problem
~/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.