Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clustering guide is not clear #730

Closed
m3dbedb opened this issue Jul 26, 2024 · 1 comment
Closed

Clustering guide is not clear #730

m3dbedb opened this issue Jul 26, 2024 · 1 comment

Comments

@m3dbedb
Copy link

m3dbedb commented Jul 26, 2024

There are too many ports configured in page https://github.com/nats-io/nats.docs/blob/master/running-a-nats-service/configuration/clustering/README.md

Server A - the 'seed server'

nats-server -p 4222 -cluster nats://localhost:4248 --cluster_name test-cluster

Server B

nats-server -p 5222 -cluster nats://localhost:5248 -routes nats://localhost:4248 --cluster_name test-cluster

Check the output of the server for the selected client and route ports.

Server C

nats-server -p 6222 -cluster nats://localhost:6248 -routes nats://localhost:4248 --cluster_name test-cluster

Check the output of the server for the selected client and route ports.

I suppose one server to have 1 port. So three servers is 3 ports. Why there are 6 ports in quoted text?

@m3dbedb m3dbedb closed this as completed Jul 26, 2024
@m3dbedb m3dbedb reopened this Jul 26, 2024
@m3dbedb
Copy link
Author

m3dbedb commented Jul 26, 2024

Here is my working configuration:

server_name: nats1
port: 4222
cluster {
  name: test-nats
  port: 6222
  routes: [
    nats-route://192.168.0.20:6222
    nats-route://192.168.0.30:6222
  ]
}
server_name: nats2
port: 4222
cluster {
  name: test-nats
  port: 6222
  routes: [
    nats-route://192.168.0.10:6222
    nats-route://192.168.0.30:6222
  ]
}
server_name: nats3
port: 4222
cluster {
  name: test-nats
  port: 6222
  routes: [
    nats-route://192.168.0.10:6222
    nats-route://192.168.0.20:6222
  ]
}

@m3dbedb m3dbedb closed this as completed Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant