Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Cluster mode

44 views
Skip to first unread message

HeinHtet Aung

unread,
Dec 9, 2024, 5:31:46 AM12/9/24
to Tinode General
in tinode external config file I saw this 

// List of available nodes.
"nodes": [
// Name and TCP address of every node in the cluster. The ports 12001..12003
// are cluster communication ports. They don't need to be exposed to end-users.
{"name": "one", "addr":"localhost:12001"},
{"name": "two", "addr":"localhost:12002"},
{"name": "three", "addr":"localhost:12003"}
],


So , if I want to run 4 node, do I need to update this ?, now I didn't use these external config file, if need to update , Is there any way to update from outside without using external config

Thanks

Gene

unread,
Dec 9, 2024, 6:26:46 AM12/9/24
to Tinode General
On Monday, December 9, 2024 at 1:31:46 PM UTC+3 HeinHtet Aung wrote:
in tinode external config file I saw this 

// List of available nodes.
"nodes": [
// Name and TCP address of every node in the cluster. The ports 12001..12003
// are cluster communication ports. They don't need to be exposed to end-users.
{"name": "one", "addr":"localhost:12001"},
{"name": "two", "addr":"localhost:12002"},
{"name": "three", "addr":"localhost:12003"}
],


So , if I want to run 4 node, do I need to update this ?,

Yes.
 
now I didn't use these external config file, if need to update , Is there any way to update from outside without using external config

I don't understand your question. Are you asking about a docker container?
 

Thanks

HeinHtet Aung

unread,
Dec 9, 2024, 9:57:19 AM12/9/24
to Tinode General
Sorry for my confuse question, now I got it,  now my tinode server with cluster mode is running in docker container ( I run 3 node), So from client side(tinode web app and python simple chat bot),  which node's endpoint need to call because now I have 3 endpoint for 3 node ?

Gene

unread,
Dec 9, 2024, 10:04:01 AM12/9/24
to Tinode General
On Monday, December 9, 2024 at 5:57:19 PM UTC+3 HeinHtet Aung wrote:
Sorry for my confuse question, now I got it,  now my tinode server with cluster mode is running in docker container ( I run 3 node), So from client side(tinode web app and python simple chat bot),  which node's endpoint need to call because now I have 3 endpoint for 3 node ?

HeinHtet Aung

unread,
Dec 10, 2024, 5:55:53 AM12/10/24
to Tinode General
Thanks, Gene,  now I got it previously I already tried with load balancer but at that time I was using single instance mode, that why it did not work when I run two tinode servers, 
now I run with cluster mode in Kubernetes , I updated config file like this :

          "cluster_config": {
            // Name of this node. Can be assigned from the command line as --cluster_self.
            // Empty string disables clustering.
            "self": "tinode-1",

            // List of available nodes.
            "nodes": [
              // Name and TCP address of every node in the cluster. The ports 12001..12003
              // are cluster communication ports. They don't need to be exposed to end-users.
              {"name": "tinode-1", "addr": "tinode-1.tinode.svc.cluster.local:12001"}
            ],

Now I just run only one server with cluster mode, but seems like have some issues, this is a private link for tinode-1  ("tinode-1.tinode.svc.cluster.local:12001")
When I check log I see a connection fail error for tinode-1 ""error: unable to upgrade connection: container not found ("tinode-1")""

 error may be I don't know try to call that endpoint but at that time, the service is not ready yet.
I already tryed with docker-compose , it is working fine, having issue in Kubernetes

Thanks

Gene

unread,
Dec 10, 2024, 6:36:19 AM12/10/24
to Tinode General
It looks like you are running a single node in cluster mode. That does not make sense and is not supported. You should not run a single node in cluster mode. 

The issues you are having are not specific to Tinode. I would suggest you to hire a competent sysadmin.

Reply all
Reply to author
Forward
0 new messages