Skip to main content
Skip to main content
🚧 Work in Progress

NATS

Zerops provides a fully managed NATS messaging system with automated scaling and zero infrastructure overhead, letting developers focus entirely on development.

Supported Versions​

Currently supported NATS version:

  • 2.10

Import configuration version:

  • nats@2.10

Service Configuration​

Our NATS implementation features optimized default settings designed for common use cases.

Key configuration aspects include:

  • Standard protocol port 4222 for client connections
  • HTTP monitoring interface 8222 for management
  • Secure authentication with automatically generated credentials
  • Optimized settings for performance and reliability

You can fine-tune your NATS service by adjusting environment variables:

Available Configuration Options​

Note

If certain variables are not visible in your configuration, they may have been introduced after your service was created. Simply add them as secret variables to access the functionality.

VariableDescription
MAX_PAYLOADDefines the maximum allowed message size for all NATS traffic. Default: 8MB, Maximum: 64MB. See NATS limits documentation for details.
JET_STREAM_ENABLEDControls whether JetStream functionality is enabled. Default: 1 (enabled), Set to 0 to disable. See JetStream Configuration section below for more details.
important

Configuration changes require a service restart to take effect. While NATS itself supports configuration hot-reload, this feature will be implemented in a future Zerops update.

After restarting, check your service logs to confirm the changes were applied successfully.

JetStream Configuration​

The service includes JetStream functionality enabled by default, providing persistent storage capabilities for your messaging workloads:

  • Memory store: Up to 40GB for high-performance message caching
  • File store: Up to 250GB for persistent storage
  • Regular sync intervals: Ensures data durability and consistency
Note

In HA deployments, data persistence is further enhanced with 1-minute sync intervals across all nodes, ensuring robust data durability and high availability.

This configuration provides a robust foundation for message persistence while balancing performance and reliability.

Tip

Disabling JetStream can reduce resource utilization for applications that don't require message persistence.

Deployment Modes​

Warning

Deployment mode is selected during service creation and cannot be changed later.

Non-HA Mode​

  • Suitable for development and testing
  • Data persistence not guaranteed during node failures
  • Lower resource requirements

HA Mode​

  • Creates a multi-node NATS cluster
  • Configures routes between cluster nodes automatically
  • Implements NATS clustering for high availability
  • Provides improved reliability compared to non-HA deployments

Authentication Management​

Authentication credentials are automatically generated and managed by the platform. The system creates a default user (zerops) with a secure 16-character password. You can access these credentials through:

  • The service access details in the Zerops GUI
  • Environment variables in your service configuration:
    • user - Username for authentication (default: "zerops")
    • password - Generated secure password
    • connectionString - Complete connection string in the format nats://${dbUser}:${dbPassword}@${hostname}:${port}

Health Monitoring​

Zerops continuously monitors your NATS service health using built-in health checks:

  • HTTP Health Check: The system checks the /healthz endpoint at port 8222
  • Self-Healing: The platform automatically recovers unhealthy nodes when issues are detected

Health Status​

You can check the health status of your NATS service:

  1. Through the Zerops GUI dashboard
  2. By accessing the management interface at port 8222

Backup and Recovery​

Zerops provides built-in backup functionality for your NATS JetStream data, ensuring your message streams and configurations can be safely preserved and restored when needed.

Backup Process​

Backups are created in .tar.gz format using the nats backup command. They are saved to local disk, compressed, streamed to backup storage, and then deleted locally.

For general information about backup frequency and storage limits, see our Backup documentation.

Support​

For advanced configurations or custom requirements: