11.7. Making Applications Highly Available
When a scalable application is configured to be highly available, it provides multiple HAProxy gears to which an external routing layer can route traffic. This prevents any downtime.
To use this feature, you first must have the capability to make your application highly available. Contact your system administrator for more information.
After your system administrator has enabled this capability on your account, you can then enable scalable applications to be highly available using the client tools:
rhc app enable-ha App_Name
Alternatively, you can make your application highly available using the following REST API call:
curl -X POST https://Hostname/broker/rest/domains/Domain_Name/applications/App_Name/events --user Username:Password --data-urlencode event=make-ha
If an application has already been scaled past a single gear, you may need to scale up the application to deploy additional instances of HAProxy. When an application is scaled past two gears,
enable-hadoes not add a second HAProxy cartridge to the application. To resolve this, a scale-up event needs to happen for the second HAProxy cartridge to be added:
rhc app-scale-up test2
rhc cartridge-scale cartridge -a test2 --min min_value
Once the application has been scaled up, the second HAProxy instance will remain as long as the application is scaled to at least two gears.