Reference architecture: up to 1,000 users

This page describes GitLab reference architecture for up to 1,000 users. For a full list of reference architectures, see Available reference architectures.

If you are serving up to 1,000 users and you don’t have strict availability requirements, a single-node solution with frequent backups is appropriate for many organizations.

Users Configuration GCP AWS Azure
Up to 500 4 vCPU, 3.6 GB memory n1-highcpu-4 c5.xlarge F4s v2
Up to 1,000 8 vCPU, 7.2 GB memory n1-highcpu-8 c5.2xlarge F8s v2

The diagram above shows that while GitLab can be installed on a single server, it is internally composed of multiple services. As a GitLab instance is scaled, each of these services are broken out and independently scaled according to the demands placed on them. In some cases PaaS can be leveraged for some services (for example, Cloud Object Storage for some file systems). For the sake of redundancy some of the services become clusters of nodes storing the same data. In a horizontal configuration of GitLab there are various ancillary services required to coordinate clusters or discover of resources (for example, PgBouncer for PostgreSQL connection management, Consul for Prometheus end point discovery).

Requirements

Before starting, you should take note of the following requirements / guidance for this reference architecture.

Supported CPUs

This reference architecture was built and tested on Google Cloud Platform (GCP) using the Intel Xeon E5 v3 (Haswell) CPU platform as a baseline (Sysbench benchmark).

Newer, similarly sized CPUs are supported and may have improved performance as a result. For Omnibus environments, ARM-based equivalents are also supported.

note
Any “burstable” instance types are not recommended due to inconsistent performance.

Supported infrastructure

As a general guidance, GitLab should run on most infrastructure such as reputable Cloud Providers (AWS, GCP) and their services, or self managed (ESXi) that meet both the specs detailed above, as well as any requirements in this section. However, this does not constitute a guarantee for every potential permutation.

See Recommended cloud providers and services for more information.

Additional workloads

The Reference Architectures have been designed and tested for standard GitLab setups with good headroom in mind to cover most scenarios. However, if any additional workloads are being added on the nodes, such as security software, you may still need to adjust the specs accordingly to compensate.

This also applies for some GitLab features where it’s possible to run custom scripts, for example server hooks.

As a general rule, it’s recommended to have robust monitoring in place to measure the impact of any additional workloads to inform any changes needed to be made.

Swap

In addition to the stated configurations, we recommend having at least 2 GB of swap on your server, even if you currently have enough available memory. Having swap helps to reduce the chance of errors occurring if your available memory changes. We also recommend configuring the kernel’s swappiness setting to a lower value (such as 10) to make the most of your memory, while still having the swap available when needed. View the Memory requirements for details.

Setup instructions

To install GitLab for this default reference architecture, use the standard installation instructions.

You can also optionally configure GitLab to use an external PostgreSQL service or an external object storage service for added performance and reliability at an increased complexity cost.

You can leverage Elasticsearch and enable Advanced Search for faster, more advanced code search across your entire GitLab instance.

Elasticsearch cluster design and requirements are dependent on your specific data. For recommended best practices about how to set up your Elasticsearch cluster alongside your instance, read how to choose the optimal cluster configuration.

Cloud Native Hybrid reference architecture with Helm Charts

Cloud Native Hybrid Reference Architecture is an alternative approach where select stateless components are deployed in Kubernetes via our official Helm Charts, and stateful components are deployed in compute VMs with Omnibus.

The 2k GitLab Cloud Native Hybrid (non HA) and 3k GitLab Cloud Native Hybrid (HA) reference architectures are the smallest we recommend in Kubernetes. For environments that serve fewer users, you can lower the node specs. Depending on your user count, you can lower all suggested node specs as desired. However, it’s recommended that you don’t go lower than the general requirements.