I hope you have already checked the release notes of 3.4 version and checked the compatibility of this version with your applications. Also to upgrade from 2.4 to 3.4, first we need to upgrade to 3.0 and then 3.4. For setting up the replication, minimum 3 nodes will be required. One will serve as primary, second as secondary and last node as arbitrary ( helps to elect primary node ).