phoenixframework / phoenix_pubsub_redis

The Redis PubSub adapter for the Phoenix framework
175 stars 66 forks source link

How to set the node_name when there are multiple dynos on Heroku env? #70

Open tomwang57 opened 7 months ago

tomwang57 commented 7 months ago

I set up the redis adapter according to the doc and deployed it to Heroku where we have 2 dynos running like:

elixir --sname server -S mix phx.server

I didn't set the node_name manually to let it pick the one of --sname:

{Phoenix.PubSub,
        adapter: Phoenix.PubSub.Redis,
        url: System.get_env("REDIS_URL"),
        name: WebInterface.PubSub},

But it didn't work: messages still not sync between nodes. So am i missing something?