← Graph

Use Rack socket hijacking for long-running connections

takeaway 2 connections

Rack's request/response model does not fit WebSockets or similar persistent connections. The Rack hijacking API lets you grab the underlying socket, hand it to a proxy running on a separate thread, return a dummy response to Rack, and go on serving the next request.

type
recommendation
takeaway Use Rack socket hijacking for long-running connections
about
Direct advice about using the hijacking API
takeaway Use Rack socket hijacking for long-running connections
from_talk
Takeaway from the Rack hijacking section

Provenance