diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /doc/administration/redis | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'doc/administration/redis')
-rw-r--r-- | doc/administration/redis/replication_and_failover_external.md | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/doc/administration/redis/replication_and_failover_external.md b/doc/administration/redis/replication_and_failover_external.md index 54d13991f3f..cfe5a3157d9 100644 --- a/doc/administration/redis/replication_and_failover_external.md +++ b/doc/administration/redis/replication_and_failover_external.md @@ -32,14 +32,37 @@ Note the Redis node's IP address or hostname, port, and password (if required). 1. Configure the GitLab application servers with the appropriate connection details for your external Redis service in your `/etc/gitlab/gitlab.rb` file: + When using a single Redis instance: + ```ruby redis['enable'] = false - gitlab_rails['redis_host'] = 'redis.example.com' - gitlab_rails['redis_port'] = 6379 + gitlab_rails['redis_host'] = '<redis_instance_url>' + gitlab_rails['redis_port'] = '<redis_instance_port>' # Required if Redis authentication is configured on the Redis node - gitlab_rails['redis_password'] = 'Redis Password' + gitlab_rails['redis_password'] = '<redis_password>' + + # Set to true if instance is using Redis SSL + gitlab_rails['redis_ssl'] = true + ``` + + When using separate Redis Cache and Persistent instances: + + ```ruby + redis['enable'] = false + + # Default Redis connection + gitlab_rails['redis_host'] = '<redis_persistent_instance_url>' + gitlab_rails['redis_port'] = '<redis_persistent_instance_port>' + gitlab_rails['redis_password'] = '<redis_persistent_password>' + + # Set to true if instance is using Redis SSL + gitlab_rails['redis_ssl'] = true + + # Redis Cache connection + # Replace `redis://` with `rediss://` if using SSL + gitlab_rails['redis_cache_instance'] = 'redis://:<redis_cache_password>@<redis_cache_instance_url>:<redis_cache_instance_port>' ``` 1. Reconfigure for the changes to take effect: @@ -48,6 +71,15 @@ Note the Redis node's IP address or hostname, port, and password (if required). sudo gitlab-ctl reconfigure ``` +### Setting the Redis Cache instance as an LRU + +When configuring a Redis Cache instance, it should be configured as a [Least Recently Used cache](https://redis.io/docs/manual/eviction/) (LRU) accordingly. + +Configuring this depends on the cloud provider or service, but generally the following settings and values configure a cache: + +- `maxmemory-policy` = `allkeys-lru` +- `maxmemory-samples` = `5` + ## Redis replication and failover with your own Redis servers This is the documentation for configuring a scalable Redis setup when |