WebSockets and Phoenix Channels

Explore the benefits of using WebSockets and Phoenix channels.

WebSockets and Phoenix channels

WebSockets map very well to the Erlang/OTP actor model and are leveraged by one of the stars of Phoenix: Channels. WebSockets are the primary communication layer for Channels. This provides Channels with a solid foundation on which to build real-time applications. We’ll be using Phoenix Channels with WebSockets throughout this course.

Maybe we’re worried that WebSockets will cause high resource usage in our application. Don’t worry! Phoenix and Elixir make it easy to have tens of thousands of connections on a single server. Each connected Channel and WebSocket in our application has independent memory management and garbage collection because of OTP processes.

Get hands-on with 1200+ tech skills courses.