Supported Geo data types (PREMIUM SELF)
A Geo data type is a specific class of data that is required by one or more GitLab features to store relevant information.
To replicate data produced by these features with Geo, we use several strategies to access, transfer, and verify them.
We distinguish between three different data types:
See the list below of each feature or component we replicate, its corresponding data type, replication, and verification methods:
|Type||Feature / component||Replication method||Verification method|
|Database||Application data in PostgreSQL||Native||Native|
|Database||Redis||Not applicable (1)||Not applicable|
|Database||SSH public keys||PostgreSQL Replication||PostgreSQL Replication|
|Git||Project repository||Geo with Gitaly||Gitaly Checksum|
|Git||Project wiki repository||Geo with Gitaly||Gitaly Checksum|
|Git||Project designs repository||Geo with Gitaly||Gitaly Checksum|
|Git||Project Snippets||Geo with Gitaly||Gitaly Checksum|
|Git||Personal Snippets||Geo with Gitaly||Gitaly Checksum|
|Git||Group wiki repository||Geo with Gitaly||Not implemented|
|Blobs||User uploads (file system)||Geo with API||SHA256 checksum|
|Blobs||User uploads (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||LFS objects (file system)||Geo with API||SHA256 checksum|
|Blobs||LFS objects (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||CI job artifacts (file system)||Geo with API||SHA256 checksum|
|Blobs||CI job artifacts (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Archived CI build traces (file system)||Geo with API||Not implemented|
|Blobs||Archived CI build traces (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Container registry (file system)||Geo with API/Docker API||Not implemented|
|Blobs||Container registry (object storage)||Geo with API/Managed/Docker API (2)||Not implemented|
|Blobs||Package registry (file system)||Geo with API||SHA256 checksum|
|Blobs||Package registry (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Infrastructure registry (file system)||Geo with API||SHA256 checksum|
|Blobs||Infrastructure registry (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Versioned Terraform State (file system)||Geo with API||SHA256 checksum|
|Blobs||Versioned Terraform State (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||External Merge Request Diffs (file system)||Geo with API||SHA256 checksum|
|Blobs||External Merge Request Diffs (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Pipeline artifacts (file system)||Geo with API||SHA256 checksum|
|Blobs||Pipeline artifacts (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Pages (file system)||Geo with API||SHA256 checksum|
|Blobs||Pages (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||CI Secure Files (file system)||Geo with API||SHA256 checksum|
|Blobs||CI Secure Files (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Incident Metric Images (file system)||Geo with API/Managed||SHA256 checksum|
|Blobs||Incident Metric Images (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Alert Metric Images (file system)||Geo with API||SHA256 checksum|
|Blobs||Alert Metric Images (object storage)||Geo with API/Managed (2)||Not implemented|
|Blobs||Dependency Proxy Images_(file system)_||Geo with API||SHA256 checksum|
|Blobs||Dependency Proxy Images (object storage)||Geo with API/managed (2)||Not implemented|
- (1): Redis replication can be used as part of HA with Redis sentinel. It's not used between Geo sites.
- (2): Object storage replication can be performed by Geo or by your object storage provider/appliance native replication feature.
A GitLab instance can have one or more repository shards. Each shard has a Gitaly instance that is responsible for allowing access and operations on the locally stored Git repositories. It can run on a machine:
- With a single disk.
- With multiple disks mounted as a single mount-point (like with a RAID array).
- Using LVM.
GitLab does not require a special file system and can work with:
- A mounted Storage Appliance (there may be performance limitations when using a remote file system).
Geo triggers garbage collection in Gitaly to deduplicate forked repositories on Geo secondary sites.
Communication is done via Gitaly's own gRPC API, with three possible ways of synchronization:
- Using regular Git clone/fetch from one Geo site to another (with special authentication).
- Using repository snapshots (for when the first method fails or repository is corrupt).
- Manual trigger from the Admin Area (a combination of both of the above).
Each project can have at most 3 different repositories:
- A project repository, where the source code is stored.
- A wiki repository, where the wiki content is stored.
- A design repository, where design artifacts are indexed (assets are actually in LFS).
They all live in the same shard and share the same base name with a
for Wiki and Design Repository cases.
Besides that, there are snippet repositories. They can be connected to a project or to some specific user. Both types are synced to a secondary site.
GitLab stores files and blobs such as Issue attachments or LFS objects into either:
- The file system in a specific location.
- An Object Storage solution. Object Storage solutions can be:
- Cloud based like Amazon S3 Google Cloud Storage.
- Hosted by you (like MinIO).
- A Storage Appliance that exposes an Object Storage-compatible API.
When using the file system store instead of Object Storage, use network mounted file systems to run GitLab when using more than one node.
With respect to replication and verification:
- We transfer files and blobs using an internal API request.
- With Object Storage, you can either:
- Use a cloud provider replication functionality.
- Have GitLab replicate it for you.
GitLab relies on data stored in multiple databases, for different use-cases. PostgreSQL is the single point of truth for user-generated content in the Web interface, like issues content, comments as well as permissions and credentials.
PostgreSQL can also hold some level of cached data like HTML-rendered Markdown and cached merge-requests diff. This can also be configured to be offloaded to object storage.
We use PostgreSQL's own replication functionality to replicate data from the primary to secondary sites.
We use Redis both as a cache store and to hold persistent data for our background jobs system. Because both use-cases have data that are exclusive to the same Geo site, we don't replicate it between sites.
Elasticsearch is an optional database that for advanced searching capabilities. It can improve search in both source-code level, and user generated content in issues, merge requests, and discussions. Elasticsearch is not supported in Geo.
Limitations on replication/verification
The following table lists the GitLab features along with their replication and verification status on a secondary site.
You can keep track of the progress to implement the missing items in these epics/issues:
- Geo: Build a scalable, self-service Geo replication and verification framework
- Geo: Improve the self-service Geo replication framework
- Geo: Move existing blobs to framework
- Geo: Add unreplicated data types
Replicated data types behind a feature flag
The replication for some data types is behind a corresponding feature flag:
- They're deployed behind a feature flag, enabled by default.
- They're enabled on GitLab.com.
- They can't be enabled or disabled per-project.
- They are recommended for production use.
- For GitLab self-managed instances, GitLab administrators can opt to disable them. (FREE SELF)
Enable or disable replication (for some data types)
Replication for some data types are released behind feature flags that are enabled by default. GitLab administrators with access to the GitLab Rails console can opt to disable it for your instance. You can find feature flag names of each of those data types in the notes column of the table below.
To disable, such as for package file replication:
To enable, such as for package file replication:
WARNING: Features not on this list, or with No in the Replicated column, are not replicated to a secondary site. Failing over without manually replicating data from those features causes the data to be lost. To use those features on a secondary site, or to execute a failover successfully, you must replicate their data using some other means.
|Feature||Replicated (added in GitLab version)||Verified (added in GitLab version)||GitLab-managed object storage replication (added in GitLab version)||GitLab-managed object storage verification (added in GitLab version)||Notes|
|Application data in PostgreSQL||Yes (10.2)||Yes (10.2)||N/A||N/A|
|Project repository||Yes (10.2)||Yes (10.7)||N/A||N/A|
|Project wiki repository||Yes (10.2)||Yes (10.7)||N/A||N/A|
|Group wiki repository||Yes (13.10)||No||N/A||N/A||Behind feature flag
|Uploads||Yes (10.2)||Yes (14.6)||Yes (15.1)||No||Replication is behind the feature flag
|LFS objects||Yes (10.2)||Yes (14.6)||Yes (15.1)||No||GitLab versions 11.11.x and 12.0.x are affected by a bug that prevents any new LFS objects from replicating.
Replication is behind the feature flag
|Personal snippets||Yes (10.2)||Yes (10.2)||N/A||N/A|
|Project snippets||Yes (10.2)||Yes (10.2)||N/A||N/A|
|CI job artifacts||Yes (10.4)||Yes (14.10)||Yes (15.1)||No||Verification is behind the feature flag
|CI Pipeline Artifacts||Yes (13.11)||Yes (13.11)||Yes (15.1)||No||Persists additional artifacts after a pipeline completes.|
|CI Secure Files||Yes (15.3)||Yes (15.3)||Yes (15.3)||No||Verification is behind the feature flag
|Container Registry||Yes (12.3)*||No||No||No||See instructions to set up the Container Registry replication.|
|Infrastructure Registry||Yes (14.0)||Yes (14.0)||Yes (15.1)||No||Behind feature flag
|Project designs repository||Yes (12.7)||No||N/A||N/A||Designs also require replication of LFS objects and Uploads.|
|Package Registry||Yes (13.2)||Yes (13.10)||Yes (15.1)||No||Behind feature flag
|Versioned Terraform State||Yes (13.5)||Yes (13.12)||Yes (15.1)||No||Replication is behind the feature flag
|External merge request diffs||Yes (13.5)||Yes (14.6)||Yes (15.1)||No||Replication is behind the feature flag
|Versioned snippets||Yes (13.7)||Yes (14.2)||N/A||N/A||Verification was implemented behind the feature flag
|GitLab Pages||Yes (14.3)||Yes (14.6)||Yes (15.1)||No||Behind feature flag
|Project-level Secure files||Yes (15.3)||Yes (15.3)||Yes (15.3)||No|
|Incident Metric Images||Yes (15.5)||Yes(15.5)||Yes (15.5)||No||Replication/Verification is handled via the Uploads data type.|
|Alert Metric Images||Yes (15.5)||Yes (15.5)||Yes (15.5)||No||Replication/Verification is handled via the Uploads data type.|
|Server-side Git hooks||Not planned||No||N/A||N/A||Not planned because of current implementation complexity, low customer interest, and availability of alternatives to hooks.|
|Elasticsearch integration||Not planned||No||No||No||Not planned because further product discovery is required and Elasticsearch (ES) clusters can be rebuilt. Secondaries use the same ES cluster as the primary.|
|Dependency Proxy Images||Yes (15.7)||Yes (15.7)||Yes (15.7)||No|
|Vulnerability Export||Not planned||No||No||No||Not planned because they are ephemeral and sensitive information. They can be regenerated on demand.|