The OpenShift forums have been retired, but you can still read and search them.
For the most up-to-date information about how to use OpenShift please visit

Addressing 1st gear in scaling applications


I don't know if I'm being dumb and I have looked quite extensively for an answer. When an app scales it is possible to bypass HAProxy and address a new instance gear directly by finding the OPENSHIFT_GEAR_DNS for that gear or by using the gear name given by HAProxy. However it does not seem to work for the local gear.

I have tried using a combo of OPENSHIFT_GEAR_UUID & OPENSHIFT_APP_DNS for the local gear (as this is how the OPENSHIFT_GEAR_DNS is made up for new scaled gears), but this does not work.

The issue is that the local gear only seems to be accessible via the OPENSHIFT_APP_DNS (which is the same as the OPENSHIFT_GEAR_DNS for this gear). This is fine for a non-scaled app but once an app scales and is under load there seems to be no guaranteed way to bypass HAProxy and access the first gear. Is this an oversight or is there some way to do it I have missed?


Dan Kitchen

Hi Dan,

Do you want to get to your primary gear directly from another (secondary) gear or from outside world?

From the outside if possible. Similar in the way you can use: OPENSHIFT_GEAR_DNS or to bypass HAProxy and directly access the application instance scaled gear.

The only way to do that is to ssh onto the head gear and run "curl $OPENSHIFT__IP:$OPENSHIFT_PORT". So for example, I'm running a php-5.3 scalable app, i would run:

rhc ssh scalableApp
env | grep IP