Supported Geo data types

  • Tier: Premium, Ultimate
  • Offering: GitLab Self-Managed

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.

Data types

We distinguish between the following different data types:

See the list below of each feature or component we replicate, its corresponding data type, replication, and verification methods:

TypeFeature / componentReplication methodVerification method
DatabaseApplication data in PostgreSQLNativeNative
DatabaseRedisNot applicable 1Not applicable
DatabaseElasticsearchNativeNative
DatabaseSSH public keysPostgreSQL ReplicationPostgreSQL Replication
GitProject repositoryGeo with GitalyGitaly Checksum
GitProject wiki repositoryGeo with GitalyGitaly Checksum
GitProject designs repositoryGeo with GitalyGitaly Checksum
GitProject SnippetsGeo with GitalyGitaly Checksum
GitPersonal SnippetsGeo with GitalyGitaly Checksum
GitGroup wiki repositoryGeo with GitalyGitaly Checksum
BlobUser uploads (file system)Geo with APISHA256 checksum
BlobUser uploads (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobLFS objects (file system)Geo with APISHA256 checksum
BlobLFS objects (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobCI job artifacts (file system)Geo with APISHA256 checksum
BlobCI job artifacts (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobArchived CI build traces (file system)Geo with APINot implemented
BlobArchived CI build traces (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobContainer registry (file system)Geo with API/Docker APISHA256 checksum
BlobContainer registry (object storage)Geo with API/Managed/Docker API 2SHA256 checksum 3
BlobPackage registry (file system)Geo with APISHA256 checksum
BlobPackage registry (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobTerraform Module Registry (file system)Geo with APISHA256 checksum
BlobTerraform Module Registry (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobVersioned Terraform State (file system)Geo with APISHA256 checksum
BlobVersioned Terraform State (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobExternal merge request diffs (file system)Geo with APISHA256 checksum
BlobExternal merge request diffs (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobPipeline artifacts (file system)Geo with APISHA256 checksum
BlobPipeline artifacts (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobPages (file system)Geo with APISHA256 checksum
BlobPages (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobCI Secure Files (file system)Geo with APISHA256 checksum
BlobCI Secure Files (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobIncident Metric Images (file system)Geo with API/ManagedSHA256 checksum
BlobIncident Metric Images (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobAlert Metric Images (file system)Geo with APISHA256 checksum
BlobAlert Metric Images (object storage)Geo with API/Managed 2SHA256 checksum 3
BlobDependency Proxy Images (file system)Geo with APISHA256 checksum
BlobDependency Proxy Images (object storage)Geo with API/managed 2SHA256 checksum 3
Container RepositoryContainer registry (file system)Geo with API/Docker APISHA256 checksum
Container RepositoryContainer registry (object storage)Geo with API/Managed/Docker API 2SHA256 checksum 3

Footnotes:

  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.
  3. Object Storage verification is behind a feature flag, geo_object_storage_verification, introduced in 16.4 and enabled by default. It uses a checksum of the file size to verify the files.

Git repositories

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. However, there can be performance limitations and consistency issues when using a remote file system.

Geo triggers garbage collection in Gitaly to deduplicate forked repositories on Geo secondary sites.

The Gitaly gRPC API does the communication, 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 -wiki and -design suffix 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.

Container repositories

Container repositories are stored in the container registry. They are a GitLab-specific concept built on top of a container registry as the datastore.

Blobs

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 and 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.

Databases

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 for advanced search. 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.

Replicated data types

Replicated data types behind a feature flag

The replication for some data types is behind a corresponding feature flag:

History

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:

Ruby Copy to clipboard
Feature.disable(:geo_package_file_replication)

To enable, such as for package file replication:

Ruby Copy to clipboard
Feature.enable(:geo_package_file_replication)

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.

FeatureReplicated (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 PostgreSQLYes (10.2)Yes (10.2)Not applicableNot applicable
Project repositoryYes (10.2)Yes (10.7)Not applicableNot applicableMigrated to self-service framework in 16.2. See GitLab issue #367925 for more details.

Behind feature flag geo_project_repository_replication, enabled by default in (16.3).

All projects, including archived projects, are replicated.
Project wiki repositoryYes (10.2)2Yes (10.7)2Not applicableNot applicableMigrated to self-service framework in 15.11. See GitLab issue #367925 for more details.

Behind feature flag geo_project_wiki_repository_replication, enabled by default in (15.11).
Group wiki repositoryYes (13.10)Yes (16.3)Not applicableNot applicableBehind feature flag geo_group_wiki_repository_replication, enabled by default.
UploadsYes (10.2)Yes (14.6)Yes (15.1)Yes (16.4)3Replication is behind the feature flag geo_upload_replication, enabled by default. Verification was behind the feature flag geo_upload_verification, removed in 14.8.
LFS objectsYes (10.2)Yes (14.6)Yes (15.1)Yes (16.4)3GitLab 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 geo_lfs_object_replication, enabled by default. Verification was behind the feature flag geo_lfs_object_verification, removed in 14.7.
Personal snippetsYes (10.2)Yes (10.2)Not applicableNot applicable
Project snippetsYes (10.2)Yes (10.2)Not applicableNot applicable
CI job artifactsYes (10.4)Yes (14.10)Yes (15.1)Yes (16.4)3Verification is behind the feature flag geo_job_artifact_replication, enabled by default in 14.10.
CI Pipeline ArtifactsYes (13.11)Yes (13.11)Yes (15.1)Yes (16.4)3Persists additional artifacts after a pipeline completes.
CI Secure FilesYes (15.3)Yes (15.3)Yes (15.3)Yes (16.4)3Verification is behind the feature flag geo_ci_secure_file_replication, enabled by default in 15.3.
Container registryYes (12.3)1Yes (15.10)Yes (12.3)1Yes (15.10)See instructions to set up the container registry replication.
Terraform Module RegistryYes (14.0)Yes (14.0)Yes (15.1)Yes (16.4)3Behind feature flag geo_package_file_replication, enabled by default.
Project designs repositoryYes (12.7)Yes (16.1)Yes (16.4)3Yes (16.4)3Designs also require replication of LFS objects and Uploads.
Package registryYes (13.2)Yes (13.10)Yes (15.1)Yes (16.4)3Behind feature flag geo_package_file_replication, enabled by default.
Versioned Terraform StateYes (13.5)Yes (13.12)Yes (15.1)Yes (16.4)3Replication is behind the feature flag geo_terraform_state_version_replication, enabled by default. Verification was behind the feature flag geo_terraform_state_version_verification, which was removed in 14.0.
External merge request diffsYes (13.5)Yes (14.6)Yes (15.1)Yes (16.4)3Replication is behind the feature flag geo_merge_request_diff_replication, enabled by default. Verification was behind the feature flag geo_merge_request_diff_verification, removed in 14.7.
Versioned snippetsYes (13.7)Yes (14.2)Yes (16.4)3Yes (16.4)3Verification was implemented behind the feature flag geo_snippet_repository_verification in 13.11, and the feature flag was removed in 14.2.
GitLab PagesYes (14.3)Yes (14.6)Yes (15.1)Yes (16.4)3Behind feature flag geo_pages_deployment_replication, enabled by default. Verification was behind the feature flag geo_pages_deployment_verification, removed in 14.7.
Project-level Secure filesYes (15.3)Yes (15.3)Yes (15.3)Yes (16.4)3
Incident Metric ImagesYes (15.5)Yes (15.5)Yes (15.5)Yes (16.4)3Replication/Verification is handled via the Uploads data type.
Alert Metric ImagesYes (15.5)Yes (15.5)Yes (15.5)Yes (16.4)3Replication/Verification is handled via the Uploads data type.
Server-side Git hooksNot plannedNoNot applicableNot applicableNot planned because of current implementation complexity, low customer interest, and availability of alternatives to hooks.
Elasticsearch integrationNot plannedNoNoNoNot 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 ImagesYes (15.7)Yes (15.7)Yes (15.7)Yes (16.4)3
Vulnerability ExportNot plannedNoNoNoNot planned because they are ephemeral and sensitive information. They can be regenerated on demand.
Packages NPM metadata cacheNot plannedNoNoNoNot planned because it would not notably improve disaster recovery capabilities nor response times at secondary sites.

Footnotes:

  1. Migrated to self-service framework in 15.5. See GitLab issue #337436 for more details.
  2. Migrated to self-service framework in 15.11. Behind feature flag geo_project_wiki_repository_replication, enabled by default. See GitLab issue #367925 for more details.
  3. Verification of files stored in object storage was introduced in GitLab 16.4 with a feature flag named geo_object_storage_verification, enabled by default.