How to call docker-based Weaviate in multi-node configuration?


I am currently running Weaviate in a docker container, in a manner similar to the multi-node (3 nodes with replication factor of 3 and read consistency level of type ONE) configuration example given in the Weaviate docs.

I wanted to know if the multi-node configuration will handle switching between nodes based on the load automatically or do we have to specify the port for each node when we define connect_to_local() in Python for client v4.

hi @AlKun25 ! Welcome to our community :hugs: !!!

it will not.

Unless you have a loadbalancer in front of you docker compose deployment, you will need to specify the port for each connection.

So if you instantiate the client to a specific port/container, it will always send the request to that specific container.

This container may reach out to other container if the data is sharded on different containers.

the best way to such a deployment is to use K8s, and define an ingress that will do the load balancing for your. You can also leverage docker swarm to achieve the same result.

Let me know if this helps!

How would one normally implement such kind of load balancer without the K8s implementation? Like what could I use in terms of tools or packages? I am using the python client.

I have different QUERY_LIMIT on each node. You can safely assume it to be 100, 25,25.


Check this forum thread on how to use docker and traefik to host your multi node Weaviate cluster: