Deploying NATS servers
A NATS server can be deployed in many ways, with support for most common OSes. If you’re planning to use it as part of an Azure application, you can choose between Linux and Windows, with x86 and Arm64 builds. You can start small, with the cheapest possible host VM, and scale up as necessary. By taking advantage of NATS’ minimal hardware requirements, starting with one core and 32MB RAM, it’s an economical choice that balances between server and networking performance.
Although NATS is often used to route messages without storing them, it includes a message queue service called JetStream. This provides a shared history across all the NATS servers in a cluster, allowing clients to retrieve messages at any time. This is useful, say, if you’re building a mobile app that needs to be able to synchronize events with a server if it goes offline for any time.
Installation options include a binary or a Docker container. If you prefer, it’s available via the third-party Scoop package manager. Alternatively, you can clone the GitHub repository and build your own install using Go. This approach can be used to embed a NATS server in your own code. The easiest option by far is to use a Docker container to host your server. This allows you to run it isolated from other applications and ensures that you have all the required components in one place.