Multiple active replicas can provide a shorter distance to the nearest replica. For example, an organization with offices in San Francisco, New York, and London could run the primary appliance in a datacenter near New York and two replicas in datacenters near San Francisco and London. Using geolocation-aware DNS, users can be directed to the closest server available and access repository data faster. Designating the appliance near New York as the primary helps reduce the latency between the hosts, compared to the appliance near San Francisco being the primary which has a higher latency to London.
The active replica proxies requests that it can't process itself to the primary instance. The replicas function as a point of presence terminating all SSL connections. Traffic between hosts is sent through an encrypted VPN connection, similar to a two-node high availability configuration without geo-replication.
Git requests and specific file server requests, such as LFS and file uploads, can be served directly from the replica without loading any data from the primary. Web requests are always routed to the primary, but if the replica is closer to the user the requests are faster due to the closer SSL termination.
Geo DNS, such as Amazon's Route 53 service, is required for geo-replication to work seamlessly. The hostname for the instance should resolve to the replica that is closest to the user's location.
Limitations
Writing requests to the replica requires sending the data to the primary and all replicas. This means that the performance of all writes is limited by the slowest replica, although new geo-replicas can seed the majority of their data from existing co-located geo-replicas, rather than from the primary.
高可用性を実現するには、アクティブ ノードを持つネットワークとパッシブ ノードを持つネットワーク間の待機時間が 70 ミリ秒未満である必要があります。 2 つのネットワーク間にファイアウォールを設定することはお勧めしません。 To reduce the latency and bandwidth caused by distributed teams and large CI farms without impacting write throughput, you can configure repository caching instead. For more information, see "About repository caching."
Geo-replication will not add capacity to a GitHub Enterprise Server instance or solve performance issues related to insufficient CPU or memory resources. If the primary appliance is offline, active replicas will be unable to serve any read or write requests.
注: GitHub Enterprise Server では、最大で 8 つの高可用性レプリカ (パッシブとアクティブ/Go のいずれでも) が利用できます。
Monitoring a geo-replication configuration
https://HOSTNAME/status
URL に対して返される状態コードを確認して、GitHub Enterprise Server の可用性を監視できます。 ユーザー トラフィックを処理できるアプライアンスは、状態コード 200
(OK) を返します。 アプライアンスは、いくつかの理由で、この URL および他の Web や API 要求に対して 503
(サービス利用不可) を返す場合があります。
- 2ノードの高可用性構成のレプリカなど、そのアプライアンスがパッシブなレプリカである場合。
- アプライアンスがメンテナンスモードになっている場合。
- アプライアンスがGeo-replication構成の一部で、ただしアクティブではないレプリカの場合。
以下からアクセスできるレプリケーションの概要ダッシュボードを使うこともできます。
https://HOSTNAME/setup/replication