このコンテンツは選択した言語では利用できません。

2.4. Enabling Support for High-Availability Applications


If you have configured an external routing layer, either the included sample or your own, to route application traffic, you must enable support for high-availability applications and configure specific DNS management options before developers can take advantage of these features.

Note

See the OpenShift Enterprise Deployment Guide for more information on using an external routing layer for high-availability applications, including how to configure the sample routing plug-in and routing daemon.

Procedure 2.3. To Enable Support for High-Availability Applications:

  1. To allow scalable applications to become highly available using the configured external router, edit the /etc/openshift/broker.conf file on the broker host and set the ALLOW_HA_APPLICATIONS parameter to "true":
    ALLOW_HA_APPLICATIONS="true"
    Copy to Clipboard Toggle word wrap
    Note that this parameter controls whether high-availability applications are allowed in general, but does not adjust user account capabilities. User account capabilities are discussed in a later step.
  2. A scaled application that is not highly available uses the following URL form:
    http://${APP_NAME}-${DOMAIN_NAME}.${CLOUD_DOMAIN}
    Copy to Clipboard Toggle word wrap
    When high-availability is enabled, HAproxy instances are deployed in multiple gears of the application, which are spread across multiple node hosts. In order to load balance user requests, a high-availability application requires a new high-availability DNS name that points to the external routing layer rather than directly to the application head gear. The routing layer then forwards requests directly to the application's HAproxy instances, which are then distributed to the framework gears. In order to create DNS entries for high-availability applications that point to the routing layer, OpenShift Enterprise adds either a prefix or suffix, or both, to the regular application name:
    http://${HA_DNS_PREFIX}${APP_NAME}-${DOMAIN_NAME}${HA_DNS_SUFFIX}.${CLOUD_DOMAIN}
    Copy to Clipboard Toggle word wrap
    To change the prefix or suffix used in the high-availability URL, you can modify the HA_DNS_PREFIX or HA_DNS_SUFFIX parameters:
    HA_DNS_PREFIX="ha-"
    HA_DNS_SUFFIX=""
    Copy to Clipboard Toggle word wrap
    If you modify the HA_DNS_PREFIX parameter and are using the sample routing daemon, ensure this parameter and the HA_DNS_PREFIX parameter in the /etc/openshift/routing-daemon.conf file are set to the same value.
  3. DNS entries for high-availability applications can either be managed by OpenShift Enterprise or externally. By default, this parameter is set to "false", which means the entries must be created externally; failure to do so could prevent the application from receiving traffic through the external routing layer. To allow OpenShift Enterprise to create and delete these entries when applications are created and deleted, set the MANAGE_HA_DNS parameter to "true":
    MANAGE_HA_DNS="true"
    Copy to Clipboard Toggle word wrap
    Then set the ROUTER_HOSTNAME parameter to the public hostname of the external routing layer, which the DNS entries for high-availability applications point to. Note that the routing layer host must be resolvable by the broker:
    ROUTER_HOSTNAME="www.example.com"
    Copy to Clipboard Toggle word wrap
  4. For developers to enable high-availability support with their scalable applications, they must have the HA allowed capability enabled on their account. By default, the DEFAULT_ALLOW_HA parameter is set to "false", which means user accounts are created with the HA allowed capability initially disabled. To have this capability enabled by default for new user accounts, set DEFAULT_ALLOW_HA to "true":
    DEFAULT_ALLOW_HA="true"
    Copy to Clipboard Toggle word wrap
    You can also adjust the HA allowed capability per user account using the oo-admin-ctl-user command with the --allowha option:
    # oo-admin-ctl-user -l user --allowha trueoo-admin-ctl-user -l user --allowha trueoo-admin-ctl-user -l user --allowha trueoo-admin-ctl-user -l user --allowha true
    Copy to Clipboard Toggle word wrap
  5. To make any changes made to the /etc/openshift/broker.conf file take effect, restart the broker service:
    # service openshift-broker restart
    Copy to Clipboard Toggle word wrap
Note that this procedure only enables the support for high-availability applications. See the OpenShift Enterprise User Guide for a procedure on how a user can make an application highly-available.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat