Tasks DNS resolution inconsistent

I have a swarm setup with a service with 22 tasks. Whenever I dig tasks.that_service I rarely get all 22, I usually get a random selection of the 22 which changes randomly over time.
Here is a graph of the # of tasks discovered over the past few days, the red line is where it’s supposed to be and the green line is where it actually is.