debian-mirror-gitlab/doc/administration/reference_architectures/1k_users.md

126 lines
7 KiB
Markdown
Raw Normal View History

2020-10-24 23:57:45 +05:30
---
2022-07-23 23:45:48 +05:30
stage: Systems
2020-10-24 23:57:45 +05:30
group: Distribution
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-10-24 23:57:45 +05:30
---
2020-05-24 23:13:21 +05:30
2021-03-11 19:13:27 +05:30
# Reference architecture: up to 1,000 users **(FREE SELF)**
2020-05-24 23:13:21 +05:30
2020-10-24 23:57:45 +05:30
This page describes GitLab reference architecture for up to 1,000 users. For a
full list of reference architectures, see
[Available reference architectures](index.md#available-reference-architectures).
2020-06-23 00:09:42 +05:30
2022-08-13 15:12:31 +05:30
If you are serving up to 1,000 users and you don't have strict availability
2020-10-24 23:57:45 +05:30
requirements, a single-node solution with
2022-11-25 23:54:43 +05:30
[frequent backups](index.md#backups) is appropriate for
2021-11-11 11:23:49 +05:30
many organizations.
2020-05-24 23:13:21 +05:30
2020-10-24 23:57:45 +05:30
> - **Supported users (approximate):** 1,000
2021-03-08 18:12:59 +05:30
> - **High Availability:** No. For a highly-available environment, you can
2021-06-08 01:23:25 +05:30
> follow a modified [3K reference architecture](3k_users.md#supported-modifications-for-lower-user-counts-ha).
2022-04-04 11:22:00 +05:30
> - **Estimated Costs:** [See cost table](index.md#cost-to-run)
2021-11-18 22:05:49 +05:30
> - **Cloud Native Hybrid:** No. For a cloud native hybrid environment, you
> can follow a [modified hybrid reference architecture](#cloud-native-hybrid-reference-architecture-with-helm-charts).
2022-06-21 17:19:12 +05:30
> - **Validation and test results:** The Quality Engineering team does [regular smoke and performance tests](index.md#validation-and-test-results) to ensure the reference architectures remain compliant
2021-12-11 22:18:48 +05:30
> - **Test requests per second (RPS) rates:** API: 20 RPS, Web: 2 RPS, Git (Pull): 2 RPS, Git (Push): 1 RPS
> - **[Latest Results](https://gitlab.com/gitlab-org/quality/performance/-/wikis/Benchmarks/Latest/1k)**
2022-11-25 23:54:43 +05:30
> - **Unsure which Reference Architecture to use?** [Go to this guide for more info](index.md#deciding-which-architecture-to-use).
2020-10-24 23:57:45 +05:30
2021-06-08 01:23:25 +05:30
| 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` |
2020-10-24 23:57:45 +05:30
2022-01-26 12:08:38 +05:30
```plantuml
@startuml 1k
card "**Prometheus + Grafana**" as monitor #7FFFD4
package "GitLab Single Server" as gitlab-single-server {
together {
card "**GitLab Rails**" as gitlab #32CD32
card "**Gitaly**" as gitaly #FF8C00
card "**PostgreSQL**" as postgres #4EA7FF
card "**Redis**" as redis #FF6347
card "**Sidekiq**" as sidekiq #ff8dd1
}
card "Local Storage" as local_storage #white
}
gitlab -[#32CD32]--> gitaly
gitlab -[#32CD32]--> postgres
gitlab -[#32CD32]--> redis
gitlab -[#32CD32]--> sidekiq
gitaly -[#32CD32]--> local_storage
postgres -[#32CD32]--> local_storage
sidekiq -[#32CD32]--> local_storage
gitlab -[#32CD32]--> local_storage
monitor .[#7FFFD4]u-> gitlab
monitor .[#7FFFD4]u-> sidekiq
monitor .[#7FFFD4]-> postgres
monitor .[#7FFFD4]-> gitaly
monitor .[#7FFFD4,norank]--> redis
@enduml
```
2022-07-23 23:45:48 +05:30
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).
2022-01-26 12:08:38 +05:30
## 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
2020-10-24 23:57:45 +05:30
[Intel Xeon E5 v3 (Haswell)](https://cloud.google.com/compute/docs/cpu-platforms)
2022-10-11 01:57:18 +05:30
CPU platform as a baseline ([Sysbench benchmark](https://gitlab.com/gitlab-org/quality/performance/-/wikis/Reference-Architectures/GCP-CPU-Benchmarks)).
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.
2020-10-24 23:57:45 +05:30
2022-01-26 12:08:38 +05:30
### Supported infrastructure
As a general guidance, GitLab should run on most infrastructure such as reputable Cloud Providers (AWS, GCP, Azure) 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.
2022-11-25 23:54:43 +05:30
See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
2022-01-26 12:08:38 +05:30
### Swap
2021-01-03 14:25:43 +05:30
In addition to the stated configurations, we recommend having at least 2 GB of
2020-10-24 23:57:45 +05:30
swap on your server, even if you currently have enough available memory. Having
2021-01-03 14:25:43 +05:30
swap helps to reduce the chance of errors occurring if your available memory
2020-10-24 23:57:45 +05:30
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
2022-08-13 15:12:31 +05:30
the swap available when needed. View the
[Memory requirements](../../install/requirements.md#memory) for details.
2020-05-24 23:13:21 +05:30
## Setup instructions
2021-01-03 14:25:43 +05:30
To install GitLab for this default reference architecture, use the standard
2021-03-11 19:13:27 +05:30
[installation instructions](../../install/index.md).
2020-05-24 23:13:21 +05:30
2021-01-03 14:25:43 +05:30
You can also optionally configure GitLab to use an [external PostgreSQL service](../postgresql/external.md)
or an [external object storage service](../object_storage.md) for added
2021-03-11 19:13:27 +05:30
performance and reliability at an increased complexity cost.
2021-01-03 14:25:43 +05:30
2021-03-11 19:13:27 +05:30
## Configure Advanced Search **(PREMIUM SELF)**
2021-01-03 14:25:43 +05:30
2022-07-23 23:45:48 +05:30
You can leverage Elasticsearch and [enable Advanced Search](../../integration/advanced_search/elasticsearch.md)
2021-01-03 14:25:43 +05:30
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
2022-07-23 23:45:48 +05:30
[choose the optimal cluster configuration](../../integration/advanced_search/elasticsearch.md#guidance-on-choosing-optimal-cluster-configuration).
2021-11-18 22:05:49 +05:30
## 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](https://docs.gitlab.com/charts/),
and _stateful_ components are deployed in compute VMs with Omnibus.
The [2k GitLab Cloud Native Hybrid](2k_users.md#cloud-native-hybrid-reference-architecture-with-helm-charts-alternative) (non HA) and [3k GitLab Cloud Native Hybrid](3k_users.md#cloud-native-hybrid-reference-architecture-with-helm-charts-alternative) (HA) reference architectures are the smallest we recommend in Kubernetes.
2022-08-13 15:12:31 +05:30
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](../../install/requirements.md).