split distributed mode to master and slave