what are the precautions we should take if the same applications with PEGA 7 and PEGA 8 versions resides in the same server. We need both the applications to be working at the same time. They shares different rule schema but the data schema is same for both.
You cannot share data schemas between two different versions of Pega, this will cause issues and isn't a supported configuration.
If they have different data schemas, this should be fine in general, though I would recommend separating port usage to avoid potential conflicts:
Cluster port range with default value:
<env name="cluster/hazelcast/ports" value="5701-5800" />
Elasticsearch port range with default value:
<env name=”indexing/distributed/transport/port” value=”9300-9399” />
If you're using stream nodes in 7.x, you'd want to separate these individual ports (not ranges) as well (I'm not sure if these settings work on 7.x, but they do on 8.x):
<env name="dsm/services/stream/pyBrokerPort" value="9092" />
<env name="dsm/services/stream/pyKeeperPort" value="2181" />
<env name="dsm/services/stream/pyJmxPort" value="9999" />
<env name="dsm/services/stream/pyPort" value="7003" />
If you have DDS nodes (for Pega Marketing), you cannot run two of those on the same server at this time.