How to ensure tasks are scheduled on separate nodes?

Is there an option to make sure that all tasks in a service run on separate nodes? If so, will this constraint be honored where the service is scaled upwards (more replicas)?

MosaixSoft has just released the Optima scheduler for Docker, which provides the anti-affinity constraints you are requesting, along with powerful and practical scheduling policies.

Yes, this is the default behavior in swarm mode as of 1.13 & up as long as you are using the spread strategy (which is the default) & you have multiple worker nodes. This was a change done in order to ensure that a scaled up service runs in HA mode.