This document summarizes the technology stack and use of websockets at oneplaylist.fm. The key aspects are:
- The stack includes Ruby on Rails, Redis, EventMachine, HAProxy, Resque, MongoDB, CoffeeScript, and Elasticsearch.
- HAProxy is used for TCP load balancing and handles HTTP as well, distributing traffic across multiple Rails app servers, Elasticsearch instances, and the EventMachine websocket server.
- Websockets are handled via a TCP connection to the EventMachine server through a separate subdomain, keeping HTTP requests on the main app domain.
- Redis is used for centralized communication and state management via Pub/Sub, with tokens mapping users to channels and event data pushed