Is it good idea to launch mesos master
and mesos slave
together on every node?
If no, how to calc number of master
nodes?
Having mesos master and slave in same instance is not good practice. If your system is down then it affects your entire cluster operations
Mesos depends on zookeeper for leader election.
To launch simple mesos cluster run zookeeper and mesos master in one instance
Launch slaves in other machines pointing to mesos master.
For HA setup
Run zookeeper
Have 3 stand by master
Point all slaves to ZK.
If mesos master gets down ZK promotes stand by master as mesos master.