How does docker registry work with swarm mode?

A related post: Docker 1.12 swarm still needs http (reverse) proxy?