Shivae
internal node discovery
Redeploy is not a problem, the clustering is handling all that automatically, I just need to basically have every node know its own ip first and then its all good 😄 might just have to dump the env to see if I can find what I need there
23 replies
internal node discovery
I mean I could try to get an interactive console on my nodes and try to figure out how the railway internal network is set up but I thought I'd ask if anyone has already dealt with this?
And things like undocumented env variables that you can only find through discord 😄 I was hoping to maybe figure out a way to get each replicas ip through an env variable, as that would help tremedously too
23 replies
internal node discovery
Sure think, so Erlang has a feature called clustering where if you run multiple nodes of your application, and they can discover each other, they connect and are able to do things like transfer jobs, share pubsub etc.
But to get that setup you need some way for nodes to discover each other. Ways to do that are:
- a static list (obviously not railway compatible)
- An orchestrator like k8s that can provide a list of nodes, example: https://www.gigalixir.com/docs/cluster
- Some way to broadcast/gossip discovery, in my case I tried dns resolution, since we have the app.internal names we can use to communicate in the app pricate network, an example: https://fly.io/docs/elixir/the-basics/clustering/
23 replies