You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a service with 3 replicas waiting for requests on published port (in my case 1402) and my goal is to load balance the incoming requests for this service.
My service has two virtual IPs 172.18.0.7 and 172.18.1.9. And each of the 3 containers has:
replica1: 172.18.0.8, 172.18.1.10
replica2: 172.18.0.9, 172.18.1.11
replica3: 172.18.0.10 172.18.1.12
I expected when the incoming request reaches the VIP of the service it will be sent only to one of the containers. And the next request to another. Also, I am not sure if I should expect this to be a round-robin or some other algorithm for load balancing.
I made traces with tcpdump from each of the containers and I am getting the following:
I can see the SYN packet to the docker_gw_bridge in TCP stream 0 and then TCP stream 1 from all of the containers
replica 1:
replica 2:
tcp stream 2:
replica 3:
Output of docker version:
docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:03:45 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:21 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
[root@localhost rmc]#
The text was updated successfully, but these errors were encountered:
networkingana
changed the title
TCP SYN packet sent to all replicas from a service in docker swarmTCP SYN sent to all replicas from a service on an ingress network
TCP SYN sent to all replicas from a service on an ingress network
Nov 9, 2020
I can't find anything in the doc how the mesh does the load balancing, but I think it is one possibility to try to connect a bunch of endpoints and the first one wins.
If it would try one after the other there would be needed a lot of time and how long should it wait for trying the next.
It is not really known which replica does really work and will answer the SYN successful.
So maybe with 100 service replicas it would only send the SYN to 10... (just a guess)
Maybe there is also an internal state knowledge with success/fail counts and time.
Your replicas 2 and 3 are only tested for connectivity and the connection is closed immediately by the load balancer in the ingress mesh.
Have you tried it multiple times?!
You should see that there is some RR and the replicas doing the work should change.
I have a service with 3 replicas waiting for requests on published port (in my case 1402) and my goal is to load balance the incoming requests for this service.
I created two networks like following
and I removed the existing network
My service has two virtual IPs 172.18.0.7 and 172.18.1.9. And each of the 3 containers has:
replica1: 172.18.0.8, 172.18.1.10
replica2: 172.18.0.9, 172.18.1.11
replica3: 172.18.0.10 172.18.1.12
I expected when the incoming request reaches the VIP of the service it will be sent only to one of the containers. And the next request to another. Also, I am not sure if I should expect this to be a round-robin or some other algorithm for load balancing.
I made traces with tcpdump from each of the containers and I am getting the following:
![image](https://user-images.githubusercontent.com/71390216/98567535-57597100-22b0-11eb-8f89-2e4c9aa5ca32.png)
![image](https://user-images.githubusercontent.com/71390216/98567623-6fc98b80-22b0-11eb-8bd4-4026fa15f61c.png)
![image](https://user-images.githubusercontent.com/71390216/98567689-81ab2e80-22b0-11eb-9668-f5733e5c205b.png)
![image](https://user-images.githubusercontent.com/71390216/98567720-8ec81d80-22b0-11eb-9b03-a189ec6122a1.png)
I can see the SYN packet to the docker_gw_bridge in TCP stream 0 and then TCP stream 1 from all of the containers
replica 1:
replica 2:
tcp stream 2:
replica 3:
Output of
docker version
:Output of
docker info
:OS: CentOS 7.8
Kernel: 3.10.0-1127.19.1.el7.x86_64
Hypervisor: ESXi 6.5
The text was updated successfully, but these errors were encountered: