How can a Phoenix application tailored only to use channels scale on multiple machines? Using HAProxy? How to broadcast messages to all nodes?

前端 未结 3 1974
北荒
北荒 2021-02-09 10:31

I use the node application purely for socket.io channels with Redis PubSub, and at the moment I have it spread across 3 machines, backed by nginx load balancing on one of the ma

3条回答
  •  独厮守ぢ
    2021-02-09 11:10

    Unless I am misunderstanding your use case, you can still use the exact scaling technique your node version of the application is. Simply deploy the Phoenix application to > 1 machines and use an Nginx load balancer configured to forward requests to one of the many application machines.

    The built in node communications etc of Erlang are used for applications that scale in a different way than a web app. For instance, distributed databases or queues.

提交回复
热议问题