From 76d80ead00b7f4a0b6e974dcd6aada502e4a1af1 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Thu, 8 Oct 2020 17:20:54 +0200 Subject: [PATCH] Increased -.redis.timeout default from 100ms to 500ms Signed-off-by: Marco Pracucci --- CHANGELOG.md | 5 +++-- docs/configuration/config-file-reference.md | 2 +- pkg/chunk/cache/redis_client.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8d119f35d4..5b29858e167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,7 +45,8 @@ - `-store-gateway.sharding-ring.instance-interface` renamed to `-store-gateway.sharding-ring.instance-interface-names` - `-distributor.ring.instance-interface` renamed to `-distributor.ring.instance-interface-names` - `-ruler.ring.instance-interface` renamed to `-ruler.ring.instance-interface-names` -* [CHANGE] Renamed `-redis.enable-tls` CLI flag to `-redis.tls-enabled`, and its respective YAML config option from `enable_tls` to `tls_enabled`. #3298 +* [CHANGE] Renamed `-.redis.enable-tls` CLI flag to `-.redis.tls-enabled`, and its respective YAML config option from `enable_tls` to `tls_enabled`. #3298 +* [CHANGE] Increased default `-.redis.timeout` from `100ms` to `500ms`. #3301 * [FEATURE] Added support for shuffle-sharding queriers in the query-frontend. When configured (`-frontend.max-queriers-per-tenant` globally, or using per-tenant limit `max_queriers_per_tenant`), each tenants's requests will be handled by different set of queriers. #3113 #3257 * [FEATURE] Query-frontend: added `compression` config to support results cache with compression. #3217 * [ENHANCEMENT] Expose additional HTTP configs for the S3 backend client. New flag are listed below: #3244 @@ -73,7 +74,7 @@ * [ENHANCEMENT] Added shuffle sharding support to ruler. Added new metric `cortex_ruler_sync_rules_total`. #3235 * [ENHANCEMENT] Return an explicit error when the store-gateway is explicitly requested without a blocks storage engine. #3287 * [ENHANCEMENT] Ruler: only load rules that belong to the ruler. Improves rules synching performances when ruler sharding is enabled. #3269 -* [ENHANCEMENT] Added `-redis.tls-insecure-skip-verify` flag. #3298 +* [ENHANCEMENT] Added `-.redis.tls-insecure-skip-verify` flag. #3298 * [BUGFIX] No-longer-needed ingester operations for queries triggered by queriers and rulers are now canceled. #3178 * [BUGFIX] Ruler: directories in the configured `rules-path` will be removed on startup and shutdown in order to ensure they don't persist between runs. #3195 * [BUGFIX] Handle hash-collisions in the query path. #3192 diff --git a/docs/configuration/config-file-reference.md b/docs/configuration/config-file-reference.md index bc6bfdd2a08..67cbc148631 100644 --- a/docs/configuration/config-file-reference.md +++ b/docs/configuration/config-file-reference.md @@ -2925,7 +2925,7 @@ The `redis_config` configures the Redis backend cache. The supported CLI flags ` # Maximum time to wait before giving up on redis requests. # CLI flag: -.redis.timeout -[timeout: | default = 100ms] +[timeout: | default = 500ms] # How long keys stay in the redis. # CLI flag: -.redis.expiration diff --git a/pkg/chunk/cache/redis_client.go b/pkg/chunk/cache/redis_client.go index 9ed059cc70b..dc8789e4139 100644 --- a/pkg/chunk/cache/redis_client.go +++ b/pkg/chunk/cache/redis_client.go @@ -33,7 +33,7 @@ type RedisConfig struct { func (cfg *RedisConfig) RegisterFlagsWithPrefix(prefix, description string, f *flag.FlagSet) { f.StringVar(&cfg.Endpoint, prefix+"redis.endpoint", "", description+"Redis Server endpoint to use for caching. A comma-separated list of endpoints for Redis Cluster or Redis Sentinel. If empty, no redis will be used.") f.StringVar(&cfg.MasterName, prefix+"redis.master-name", "", description+"Redis Sentinel master name. An empty string for Redis Server or Redis Cluster.") - f.DurationVar(&cfg.Timeout, prefix+"redis.timeout", 100*time.Millisecond, description+"Maximum time to wait before giving up on redis requests.") + f.DurationVar(&cfg.Timeout, prefix+"redis.timeout", 500*time.Millisecond, description+"Maximum time to wait before giving up on redis requests.") f.DurationVar(&cfg.Expiration, prefix+"redis.expiration", 0, description+"How long keys stay in the redis.") f.IntVar(&cfg.DB, prefix+"redis.db", 0, description+"Database index.") f.IntVar(&cfg.PoolSize, prefix+"redis.pool-size", 0, description+"Maximum number of connections in the pool.")