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
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.
Variable | Description |
---|---|
MAX_PAYLOAD | Defines the maximum allowed message size for all NATS traffic. Default: 8MB , Maximum: 64MB . See NATS limits documentation for details. |
JET_STREAM_ENABLED | Controls whether JetStream functionality is enabled. Default: 1 (enabled), Set to 0 to disable. See JetStream Configuration section below for more details. |
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
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.
Disabling JetStream can reduce resource utilization for applications that don't require message persistence.
Deployment Modes
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 passwordconnectionString
- Complete connection string in the formatnats://${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:
- Through the Zerops GUI dashboard
- By accessing the management interface at port
8222
Backup and Recovery
NATS backups are created using filesystem archival:
- Format:
.tar.gz
(archive of queue state) - Tooling: Filesystem archival
- Content: Captures persistent message state
For backup configuration, scheduling, retention policies, and management options, see the Zerops Backups documentation.
Restoring Backups
To restore a NATS backup:
- Download the backup file (
.tar.gz
) from the Zerops UI - Extract the archive to access the queue state data
- Prepare your target environment (clear existing data if needed)
- Restore using NATS CLI commands via Zerops VPN or during deployment. Follow the official NATS documentation for detailed restore procedures.
For assistance with the restoration process, contact Zerops support.
Support
For advanced configurations or custom requirements:
- Join our Discord community
- Contact support via email