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

**URL:** <https://forum.weaviate.io/t/how-to-call-docker-based-weaviate-in-multi-node-configuration/2142>\
**Category:** Support\
**Tags:** python\
**Created:** [April 29, 2024, 8:46pm UTC](https://forum.weaviate.io/t/how-to-call-docker-based-weaviate-in-multi-node-configuration/2142 "2024-04-29T20:46:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlKun25](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alkun25/32/1417_2.png) [@AlKun25](https://forum.weaviate.io/u/AlKun25)\
**Post date:** [April 29, 2024, 8:46pm UTC](https://forum.weaviate.io/t/how-to-call-docker-based-weaviate-in-multi-node-configuration/2142/1 "2024-04-29T20:46:44Z")

</div>

### Description

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.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [April 30, 2024, 12:31pm UTC](https://forum.weaviate.io/t/how-to-call-docker-based-weaviate-in-multi-node-configuration/2142/2 "2024-04-30T12:31:47Z")

</div>

hi @AlKun25 ! Welcome to our community 🤗 !!!

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!

---

<div class="post-metadata">

**Author:** ![AlKun25](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/alkun25/32/1417_2.png) [@AlKun25](https://forum.weaviate.io/u/AlKun25)\
**Post date:** [May 3, 2024, 7:10pm UTC](https://forum.weaviate.io/t/how-to-call-docker-based-weaviate-in-multi-node-configuration/2142/3 "2024-05-03T19:10:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [May 7, 2024, 12:47pm UTC](https://forum.weaviate.io/t/how-to-call-docker-based-weaviate-in-multi-node-configuration/2142/4 "2024-05-07T12:47:55Z")

</div>

Hi!

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

> [@Weaviate with Traefik and gRPC](https://forum.weaviate.io/t/weaviate-with-traefik-and-grpc/1238/3):
>
> Hi @qnlbnsl ! Sorry for the delay here. Looks like I was finally able to tame this Here is what I got: NOTE: [Check this updated gist on how to correctly expose Weaviate under SSL/TLS using Traefik and running everything with a docker compose](https://gist.github.com/dudanogueira/0dd925cbf63397e256e84e991245aab3/edit) --- version: '3.4' services: weaviate: command: - --host - 0.0.0.0 - --port - '8080' - --scheme - http image: semitechnologies/weaviate:1.23.5 #ports: # - 8081:8080 # unsafe http # - 50052:50051 # unsafe grpc…
