Mongo db master switch