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.