Multi-Node Setup for NATS
This document explains the steps to enable NATS in a Pulse for multi-node setup. This setup requires you to have at least three nodes in your cluster. One of the three nodes must be Pulse core node.
Pulse Core Node Configuration
This section describes the configurations to be performed in the Pulse core node.
- Update the ad-core.yml file under the $AcceloHome/config/docker/ad-core.yml directory to use the nats-cluster-server.conf file in the volume section for ad-events.
ad-events:
...
volumes:
- ./data/nats:/data/nats-server/jetstream
- ./config/db/nats-cluster-server.conf:/config/jetstream-server.conf
- Update the
**nats-cluster-server.conf**
file under $AcceloHome/config/db/nats-cluster-server.conf directory. You must add the IP addresses of the other two nodes in appropriate places (mentioned as n1 and n2).
x
debug: true
trace: false
server_name: S1
#each container can listen to client connections on port 19009
port: 4222
jetstream = {
store_dir: "/data/nats-server/"
}
cluster = {
name: "JSC"
port: 6222
listen: "0.0.0.0:6222"
# Servers can connect to one another at
# the following routes
routes = [
"nats://n1:19008" // # Replace with n1 IP address
"nats://n2:19008" // # Replace with n2 IP address
]
}
#16MB as max allowed size for an event, default is 1MB
max_payload: 16777216
- Execute the following code to deploy the ad-events container.
accelo deploy core
Was this page helpful?