LaunchKit

Writing & video

Yield

Ruby craft, one idea at a time.

#rails #http #performance Latest
· 6 min read · 1 views

Server-sent events in Rails freeze the process they run in

ActionController::Live gives you SSE in six lines, and one open stream blocked every other request in that Puma process for as long as it stayed open. Measured on Rails 8.1.4: 3.0 seconds of blocking from a 4 second stream, while a plain sleeping action blocked nothing at all.

Read more