Skip to content

Commit f689287

Browse files
committed
nats
1 parent 8051f46 commit f689287

File tree

6 files changed

+822
-12
lines changed

6 files changed

+822
-12
lines changed

apps/docs/content/homepage.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export const databases = [
4949
{ name: "Typesense", link: "/typesense/overview", icon: <Icons.typesense/> },
5050
{ name: "Meilisearch", link: "/meilisearch/overview", icon: <Icons.meilisearch/> },
5151
{ name: "Qdrant", link: "/qdrant/overview", icon: <Icons.qdrant/> },
52+
{ name: "NATS", link: "/nats/overview", icon: <Icons.nats/> },
5253
{ name: "KeyDB", link: "/keydb/overview", icon: <Icons.keydb/> },
5354
{ name: "Kafka", icon: <Icons.kafka/> },
54-
{ name: "NATS", icon: <Icons.nats/> },
5555
]
5656

5757
export const storages = [

apps/docs/content/nats/overview.mdx

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: NATS
3+
desc: Production-ready NATS messaging system on Zerops platform with automated scaling and enterprise reliability. Deploy, manage, and scale with zero infrastructure hassle.
4+
---
5+
6+
import UnorderedList from '@site/src/components/UnorderedList';
7+
import UnorderedCodeList from '@site/src/components/UnorderedCodeList';
8+
import data from '@site/static/data.json';
9+
10+
Zerops provides a fully managed [NATS](https://nats.io/) messaging system with automated scaling and zero infrastructure overhead, letting developers focus entirely on development.
11+
12+
## Supported Versions
13+
14+
Currently supported NATS version:
15+
<UnorderedList data={data.nats.readable}/>
16+
17+
Import configuration version:
18+
<UnorderedCodeList data={data.nats.import}/>
19+
20+
## Service Configuration
21+
22+
Our NATS implementation features optimized default settings designed for common use cases.
23+
24+
**Key configuration aspects** include:
25+
- Standard protocol port `4222` for client connections
26+
- HTTP monitoring interface `8222` for management
27+
- Internal cluster port `4244` for HA deployments
28+
- Secure authentication with automatically generated credentials
29+
- Optimized settings for performance and reliability
30+
31+
### JetStream Configuration
32+
33+
The service includes [JetStream](https://docs.nats.io/nats-concepts/jetstream) functionality **enabled by default**, providing persistent storage capabilities for your messaging workloads:
34+
- **Memory store**: Up to 32GB for high-performance message caching
35+
- **File store**: Up to 100GB for persistent storage
36+
- **Regular sync intervals**: Ensures data durability and consistency
37+
38+
This configuration provides a robust foundation for message persistence while balancing performance and reliability.
39+
40+
#### Disabling JetStream
41+
42+
If you don't need message persistence, you can disable JetStream by setting the `JET_STREAM_ENABLED` environment variable to `0` in your service configuration. This can be done:
43+
44+
- During service creation through the [import configuration](/references/import)
45+
- In the Zerops GUI under service environment variables
46+
- Via the [Zerops API](/references/api) when creating a new service
47+
48+
:::tip
49+
Disabling JetStream may reduce resource usage when persistence isn't required for your application.
50+
:::
51+
52+
### Deployment Modes
53+
54+
:::warning
55+
Deployment mode is selected during service creation and cannot be changed later.
56+
:::
57+
58+
#### Non-HA Mode
59+
- Suitable for development and testing
60+
- Data persistence not guaranteed during node failures
61+
- Lower resource requirements
62+
63+
#### HA Mode
64+
- Creates a multi-node NATS cluster
65+
- Configures routes between cluster nodes automatically
66+
- Implements [NATS clustering](https://docs.nats.io/running-a-nats-service/configuration/clustering) for high availability
67+
- Provides improved reliability compared to non-HA deployments
68+
69+
### Authentication Management
70+
71+
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:
72+
- The service access details in the Zerops GUI
73+
- Environment variables in your service configuration:
74+
- `user` - Username for authentication (default: "zerops")
75+
- `password` - Generated secure password
76+
- `connectionString` - Complete connection string in the format `nats://${dbUser}:${dbPassword}@${hostname}:${port}`
77+
78+
## Health Monitoring
79+
80+
Zerops continuously monitors your NATS service health using built-in health checks:
81+
82+
- **HTTP Health Check**: The system checks the `/healthz` endpoint at port 8222
83+
- **Self-Healing**: The platform automatically recovers unhealthy nodes when issues are detected
84+
85+
### Health Status
86+
87+
You can check the health status of your NATS service:
88+
89+
1. Through the Zerops GUI dashboard
90+
2. By accessing the management interface at port `8222`
91+
92+
## Backup and Recovery
93+
94+
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.
95+
96+
### Backup Process
97+
98+
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.
99+
100+
For general information about backup frequency and storage limits, see our [Backup documentation](/features/backup).
101+
102+
## Support
103+
104+
For advanced configurations or custom requirements:
105+
- Join our [Discord community](https://discord.gg/zerops)
106+
- Contact support via [email](mailto:support@zerops.io)

apps/docs/sidebars.js

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,15 @@ module.exports = {
407407
},
408408
className: "homepage-sidebar-item service-sidebar-item",
409409
},
410+
{
411+
type: "ref",
412+
id: "nats/overview",
413+
label: "NATS",
414+
customProps: {
415+
sidebar_icon: "nats",
416+
},
417+
className: "homepage-sidebar-item service-sidebar-item",
418+
},
410419
{
411420
type: 'ref',
412421
id: 'keydb/overview',
@@ -424,15 +433,6 @@ module.exports = {
424433
// sidebar_icon: "kafka",
425434
// },
426435
// className: "homepage-sidebar-item service-sidebar-item",
427-
// },
428-
// {
429-
// type: "ref",
430-
// id: "nats/overview",
431-
// label: "NATS",
432-
// customProps: {
433-
// sidebar_icon: "nats",
434-
// },
435-
// className: "homepage-sidebar-item service-sidebar-item",
436436
// },
437437
],
438438
},
@@ -2274,6 +2274,26 @@ module.exports = {
22742274
},
22752275
},
22762276
],
2277+
nats: [
2278+
{
2279+
type: 'ref',
2280+
id: 'homepage',
2281+
label: 'Back to home',
2282+
customProps: {
2283+
sidebar_is_back_link: true,
2284+
sidebar_icon: 'back-arrow',
2285+
},
2286+
},
2287+
{
2288+
type: 'doc',
2289+
id: 'nats/overview',
2290+
label: 'Zerops NATS Service',
2291+
customProps: {
2292+
sidebar_is_title: true,
2293+
sidebar_icon: 'nats',
2294+
},
2295+
},
2296+
],
22772297
// rabbitmq: [
22782298
// {
22792299
// type: "ref",

0 commit comments

Comments
 (0)