made logic for ha / dir service cluster size