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

[How to access the cluster ? ] #279

Closed
fallenleavesguy opened this issue Oct 8, 2019 · 6 comments
Closed

[How to access the cluster ? ] #279

fallenleavesguy opened this issue Oct 8, 2019 · 6 comments
Labels

Comments

@fallenleavesguy
Copy link

How to access the cluster ? Only accessing to the leader node or accessing to any node of the cluster ? Which is the right way. Thank you.

@or-else
Copy link
Contributor

or-else commented Oct 8, 2019

Any client can connect to any node.

We currently run the cluster behind an Nginx proxy which load balances connections (round-robin):

events {}
stream {
    server {
        listen 80;
        proxy_pass tinode;
    }
    server {
        listen 443;
        proxy_pass tinode_tls;
    }
    upstream tinode {
        server tinode-0:80 max_fails=5 fail_timeout=30s;
        server tinode-1:80 max_fails=5 fail_timeout=30s;
        server tinode-2:80 max_fails=5 fail_timeout=30s;
    }
    upstream tinode_tls {
        server tinode-0:443 max_fails=5 fail_timeout=30s;
        server tinode-1:443 max_fails=5 fail_timeout=30s;
        server tinode-2:443 max_fails=5 fail_timeout=30s;
    }
}

Keep in mind that there are some bugs in the cluster. We are actively working on it now.
Cluster is not necessary unless you have more than 100,000 users.

@fallenleavesguy
Copy link
Author

Thank you. I mean that can client establish websocket to any node of cluster ? Because according to raft protocol, it seems like only can request to the leader node to make changes

@or-else
Copy link
Contributor

or-else commented Oct 8, 2019

Thank you. I mean that can client establish websocket to any node of cluster ?

Yes.

@fallenleavesguy
Copy link
Author

So, the leader node is only use to maintain the Ping status ?

@or-else
Copy link
Contributor

or-else commented Oct 8, 2019

So, the leader node is only use to maintain the Ping status ?

Correct. The leader node is only for maintaining consistency of the cluster.

@fallenleavesguy
Copy link
Author

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants