The docker swarm built-in DNS, which is used for service discovery, has a default TTL of 600.
What this means is if you use the dns alias tasks.servicename, what gets returned are the IPs for all active containers (tasks) for the service, as well as IPs for any tasks that existed within the last 600 seconds. This normally isnt a problem, but is after a task failure or an update of a service that causes a task redeploy. If you have a service with 3x replicas, and the 3x tasks are redeployed, for 600 seconds, a nslookup to tasks.servicename will return 6x IP addresses (3x active and 3x dead).