Docker swarm, http requests work very slow on overlay network

Viewed 1570

I have created overlay network like this:

docker network create -d overlay --attachable my-network

Then I have created my first service like this:

docker service create --replicas 2 --network my-network --publish 8000 --detach --name="service_a" example.com:5000/service_a:dev

Second service created like this:

docker service create  --replicas 2 --network my-network --publish 8000 --detach --name="service_b" example.com:5000/service_b:dev

When Service A makes HTTP request to Service B, it takes about 3 or more seconds to finish this request.

When I go inside one of replicas of Service B and make this HTTP request on istelf (via localhost), it takes about 0.04 seconds to finish

Why docker swarm's overlay network slows down requests like this?

1 Answers

I'm going to answer to my own question to help other people.

This problem was solved by upgrading Linux kernel version from 4.X to last version of 5.X of host machine

This was solved by using info from this thread

Related