soketi / charts

The source repository for Soketi Helm charts.
Apache License 2.0
20 stars 18 forks source link

Horizontal scaling support #13

Closed L3o-pold closed 2 years ago

L3o-pold commented 2 years ago

The helm chart do not seems to handle horizontal scaling. Following the https://docs.soketi.app/advanced-usage/horizontal-scaling/clustering documentation, I used the following env vars.

env:
- name: PORT
  value: "6001"
- name: MODE
  value: full
- name: CLUSTER_PORT
  value: "11002"
- name: SOKETI_DEBUG
  value: "1"
- name: ADAPTER_DRIVER
  value: cluster

I ended with 3 nodes that were elected master with the following logs:

soketi-66bfb59674-wmnxg soketi [Fri Mar 04 2022 22:44:16 GMT+0000 (Coordinated Universal Time)] Promoted from node to master.
soketi-66bfb59674-wmnxg soketi {
soketi-66bfb59674-wmnxg soketi   isMaster: true,
soketi-66bfb59674-wmnxg soketi   isMasterEligible: true,
soketi-66bfb59674-wmnxg soketi   weight: -0.1646433855526,
soketi-66bfb59674-wmnxg soketi   address: '127.0.0.1',
soketi-66bfb59674-wmnxg soketi   advertisement: undefined
soketi-66bfb59674-wmnxg soketi }

Is it normal or a configuration issue on my side or a known issue? Message are not always broadcaster to client, depending on which node is connected the client.

rennokki commented 2 years ago

Make sure your Kubernetes cluster runs with Weave CNI otherwise Broadcast/Multicast/Unicast won't work.

L3o-pold commented 2 years ago

@rennokki changing my CNI is not an option. Is there an other way? Redis adapter should work?

Also, a note about the Weave CNI on the readme/documentation could be great.

rennokki commented 2 years ago

Redis is the best choice in this case.

There are still alternatives to direct pod-to-pod communication at the moment that are under development, in the future maybe one of them would work properly for CNIs that has bad or no support for Broadcast/Multicast/Unicast.