We have successfully created a docker swarm with several containers, and we can say that it generally works fine. We are still developing the first version of our product, so nothing has been installed in the prod environment so far. Our configuration is still very simple (docker-compose.yml): one network, one volume, 6 services 1 replica each (with the intention of having more replicas in the future), all services are leisure services, only 1 node (with the intention of having more nodes in the future).
The only strange thing we noticed that bothers us is that after the swarm has been idle for some time (for example, no incoming request for any container on the dev server), we experience a high delay when any of the different services in our swarm, and this happens only during the first request for each service. For example:
Roy: Service A, Service B
Idle 30 mins → no incoming requests for any of the services within 30 minutes
Incoming request (request without caching) to service A -> answers after (aprox) 20 seconds
Incoming request (request without caching) to service A → immediately responds
... Further calls to Service A immediately respond
Incoming request (request without caching) to service B -> answers after (aprox) 20 seconds
Incoming request (request without caching) to service B → immediately responds
... B
( bash) , :
- Ping IP- .
- Ping (dns) ( )
- (dns) ( dns)
:
- : Ubuntu 16.04
- : 17.06.0-ce
- , ?