2019-05-23 18:01:48 -04:00
---
2022-05-29 20:08:35 -04:00
stage: Systems
2020-06-09 11:08:05 -04:00
group: Geo
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2019-05-23 18:01:48 -04:00
---
2021-08-17 11:10:19 -04:00
# Geo sites Admin Area **(PREMIUM SELF)**
2019-05-05 10:17:38 -04:00
2021-08-17 11:10:19 -04:00
You can configure various settings for GitLab Geo sites. For more information, see
2020-09-15 11:10:08 -04:00
[Geo documentation ](../../administration/geo/index.md ).
2019-05-05 10:17:38 -04:00
2021-08-17 11:10:19 -04:00
On either the primary or secondary site:
2021-06-18 11:10:16 -04:00
2021-08-26 05:11:15 -04:00
1. On the top bar, select **Menu > Admin** .
2022-04-25 05:08:29 -04:00
1. On the left sidebar, select **Geo > Sites** .
2019-05-05 10:17:38 -04:00
## Common settings
2021-08-17 11:10:19 -04:00
All Geo sites have the following settings:
2019-05-05 10:17:38 -04:00
| Setting | Description |
| --------| ----------- |
2021-08-17 11:10:19 -04:00
| Primary | This marks a Geo site as **primary** site. There can be only one **primary** site. |
2021-09-23 02:12:14 -04:00
| Name | The unique identifier for the Geo site. It's highly recommended to use a physical location as a name. Good examples are "London Office" or "us-east-1". Avoid words like "primary", "secondary", "Geo", or "DR". This makes the failover process easier because the physical location does not change, but the Geo site role can. All nodes in a single Geo site use the same site name. Nodes use the `gitlab_rails['geo_node_name']` setting in `/etc/gitlab/gitlab.rb` to lookup their Geo site record in the PostgreSQL database. If `gitlab_rails['geo_node_name']` is not set, the node's `external_url` with trailing slash is used as fallback. The value of `Name` is case-sensitive, and most characters are allowed. |
2019-05-05 20:56:13 -04:00
| URL | The instance's user-facing URL. |
2019-05-05 10:17:38 -04:00
2021-08-17 11:10:19 -04:00
The site you're currently browsing is indicated with a blue `Current` label, and
the **primary** node is listed first as `Primary site` .
2019-05-05 10:17:38 -04:00
2021-10-10 23:11:46 -04:00
## Secondary site settings
2019-05-05 10:17:38 -04:00
2021-08-17 11:10:19 -04:00
**Secondary** sites have a number of additional settings available:
2019-05-05 10:17:38 -04:00
| Setting | Description |
|---------------------------|-------------|
2021-08-17 11:10:19 -04:00
| Selective synchronization | Enable Geo [selective sync ](../../administration/geo/replication/configuration.md#selective-synchronization ) for this **secondary** site. |
2021-09-23 02:12:14 -04:00
| Repository sync capacity | Number of concurrent requests this **secondary** site makes to the **primary** site when backfilling repositories. |
| File sync capacity | Number of concurrent requests this **secondary** site makes to the **primary** site when backfilling files. |
2019-05-05 10:17:38 -04:00
## Geo backfill
2021-08-17 11:10:19 -04:00
**Secondary** sites are notified of changes to repositories and files by the **primary** site,
2021-09-23 02:12:14 -04:00
and always attempt to synchronize those changes as quickly as possible.
2019-05-05 10:17:38 -04:00
2021-08-17 11:10:19 -04:00
Backfill is the act of populating the **secondary** site with repositories and files that
2021-09-23 02:12:14 -04:00
existed *before* the **secondary** site was added to the database. Because there may be
extremely large numbers of repositories and files, it's not feasible to attempt to
download them all at once; so, GitLab places an upper limit on the concurrency of
2019-05-05 10:17:38 -04:00
these operations.
2021-09-23 02:12:14 -04:00
How long the backfill takes is dependent on the maximum concurrency, but higher
2021-12-28 10:11:32 -05:00
values place more strain on the **primary** site. The limits are configurable.
If your **primary** site has lots of surplus capacity,
2019-05-05 10:17:38 -04:00
you can increase the values to complete backfill in a shorter time. If it's
2021-09-23 02:12:14 -04:00
under heavy load and backfill reduces its availability for normal requests,
2019-05-05 10:17:38 -04:00
you can decrease them.
2022-01-17 13:16:07 -05:00
## Set up the internal URLs
> Setting up internal URLs in secondary sites was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77179) in GitLab 14.7.
You can set up a different URL for synchronization between the primary and secondary site.
2019-05-05 10:17:38 -04:00
2021-08-17 11:10:19 -04:00
The **primary** site's Internal URL is used by **secondary** sites to contact it
2019-05-05 10:17:38 -04:00
(to sync repositories, for example). The name Internal URL distinguishes it from
2021-09-23 02:12:14 -04:00
[External URL ](https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab ),
2019-05-05 10:17:38 -04:00
which is used by users. Internal URL does not need to be a private address.
2022-01-17 13:16:07 -05:00
When [Geo secondary proxying ](../../administration/geo/secondary_proxy/index.md ) is enabled,
the primary uses the secondary's internal URL to contact it directly.
The internal URL defaults to external URL. To change it:
2021-06-18 11:10:16 -04:00
2021-08-26 05:11:15 -04:00
1. On the top bar, select **Menu > Admin** .
2021-06-18 11:10:16 -04:00
1. On the left sidebar, select **Geo > Nodes** .
2021-08-17 11:10:19 -04:00
1. Select **Edit** on the site you want to customize.
2021-06-18 11:10:16 -04:00
1. Edit the internal URL.
1. Select **Save changes** .
2019-05-05 20:56:13 -04:00
2022-01-17 13:16:07 -05:00
When enabled, the Admin Area for Geo shows replication details for each site directly
from the primary site's UI, and through the Geo secondary proxy, if enabled.
2020-12-04 16:09:29 -05:00
WARNING:
2021-08-17 11:10:19 -04:00
We recommend using an HTTPS connection while configuring the Geo sites. To avoid
breaking communication between **primary** and **secondary** sites when using
2019-07-11 19:35:10 -04:00
HTTPS, customize your Internal URL to point to a load balancer with TLS
terminated at the load balancer.
2019-07-04 17:25:54 -04:00
2021-04-13 14:11:28 -04:00
WARNING:
Starting with GitLab 13.3 and [until 13.11 ](https://gitlab.com/gitlab-org/gitlab/-/issues/325522 ),
2021-09-23 02:12:14 -04:00
if you use an internal URL that is not accessible to the users, the
OAuth authorization flow does not work properly, because users are redirected
2021-04-13 14:11:28 -04:00
to the internal URL instead of the external one.
2021-08-17 11:10:19 -04:00
## Multiple secondary sites behind a load balancer
2019-05-05 20:56:13 -04:00
2021-12-28 10:11:32 -05:00
**Secondary** sites can use identical external URLs if
2021-08-17 11:10:19 -04:00
a unique `name` is set for each Geo site. The `gitlab.rb` setting
2019-09-23 02:06:19 -04:00
`gitlab_rails['geo_node_name']` must:
2019-05-05 20:56:13 -04:00
2021-06-03 08:10:18 -04:00
- Be set for each GitLab instance that runs `puma` , `sidekiq` , or `geo_logcursor` .
2021-08-17 11:10:19 -04:00
- Match a Geo site name.
2019-05-05 20:56:13 -04:00
2021-09-23 02:12:14 -04:00
The load balancer must use sticky sessions to avoid authentication
failures and cross-site request errors.
2019-05-23 18:01:48 -04:00
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
one might have when setting this up, or when something is changed, or on upgrading, it's
important to describe those, too. Think of things that may go wrong and include them here.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
Each scenario can be a third-level heading, e.g. `### Getting error message X` .
If you have none to add when creating a doc, leave this section in place
2019-07-04 17:25:54 -04:00
but commented out to help encourage others to add to it in the future. -->