How to connect machines from the same app via web sockets?

I need to deploy an app with multiple machines in multiple regions. Sometimes, the machines will have to talk to each other to exchange data.

This data exchange is bidirectional, so I need to set up a web socket connection between them.

With HTTP, you could add a special header to make your request be redirected to the machine of your choice, but how to do the same with web sockets?

An IP address for each machine would be perfect.

Every machine within the same org will be assigned a unique private ipv6 address. You can look up addresses using DNS. See:

If you run fly machines list you can also see the private IP address.

1 Like

That’s even better than I imagined, thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.