Phoenix creator here. Happy to answer any questions. This article does an excellent job diving into the underlying details of Phoenix channels and pubsub.
For those that want a thousand foot view and are curious what makes Elixir and Phoenix unique compared to other solutions, think of Phoenix channels as trivial realtime communication that is distributed out of the box. With Elixir, processes (green threads) are load balanced on both IO and CPU so no single channel client will block another, regardless of the work you may be doing. Channels are also multiplexed on a single concrete connection so the same client can be doing intensive work in one channel while receiving messages over another. The runtime is also distributed, so process messages can reach any server in the cluster which is what allows you to `broadcast(socket, "event", msg)` in a channel and it Just Works across the cluster.
Thanks a ton for Phoenix :D Re the clustering support, I can see in your article here https://dockyard.com/blog/2016/01/28/running-elixir-and-phoe... that the Erlang VM joins clusters on startup - any idea if it's easy or possible to dynamically join and leave clusters?
Sort of what you'd expect in a cloud environment: one or two bastion servers would have a known IP address, and the remaining would be expected to learn about the cluster when the joined with the bastions.
Don't know the specifics in Erlang, but in Elixir you can just use Node.connect/1 and Node.set_cookie/2: https://hexdocs.pm/elixir/Node.html
Edit: There's also stuff like libcluster (https://github.com/bitwalker/libcluster) that allow for this at a higher level afaik.