Getting session on a node from another node

Hello, I am Elixir novice. I am writing a phoenix based application.
Is it able to find that user is connected on a node from another node in a cluster?

As I do understand you, it seems as if you are seeking for presence.


Thank you for the information. Would it be bad idea if I use that for session authentication across cluster? Situation like… I use sticky session behind load balancer, and adding a node there, process continuously without rebalancing or other jobs.

In such a scenario, would it be better to use token based authentication over session based authentication?

There would be no need to store anything in the cluster…

Thank you for the information. I need to push back to clients. Would I need something extra storage like ETS or Redis to solve this?

Phoenix includes websocket, if that is what You mean by push back to clients.

You can have multiple channels on this socket. In particular, You could define a user channel, on which server could push user specific data.

Under the hood, channels are powered by pg2.

1 Like

Thank you for the kind explanation. Really helpful for me!