Yes, you can have multiple session on a single Appium server v1.7.0+ (e.g. single Appium server running on port 4723, controlling multiple device/sim, both platform droid and iOS)
You need to add additional caps as below -
-
For Android SYSTEM_PORT
e.g. caps.setCapability(AndroidMobileCapabilityType.SYSTEM_PORT, <unique port>);
-
For iOS SYSTEM_PORT
e.g. caps.setCapability(IOSMobileCapabilityType.WDA_LOCAL_PORT, <unique port>);
P.S. Tried and tested, Make sure to use a fresh instance of the Appium server on every cycle of execution.