How to build a global message service with NATS

We're looking at new example applications that show you how to make the best use of the latest Fly features with the applications you want to run.

There are actually two examples that make up this example. One example is a Websocket-based chat that relays its messages through that NATS cluster. The other part is that NATS cluster, configured as a global messaging cluster that you can install inside your Fly organization's network.

  • Chat: A 6PN Example with NATS builds on a previous Fly example messaging application using WebSockets to talk to users, and using NATS powered messaging to run in any region.

  • Global NATS Cluster shows to configure a three-node cluster of NATS servers that automatically discover and communicate with each other thanks to Fly's 6PN networking.

Both examples use Fly's 6PN and its DNS features like .internal addresses that make locating running instances of apps in an organization or region as simple as a DNS lookup.

Find more Fly examples and demonstration applications in Flight Plans - Guides and Examples.