You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updated Thanos to master
Signed-off-by: Peter Štibraný <[email protected]>
* Integrate caching bucket to bucket stores.
Signed-off-by: Peter Štibraný <[email protected]>
* Docs
Signed-off-by: Peter Štibraný <[email protected]>
* CHANGELOG.md
Signed-off-by: Peter Štibraný <[email protected]>
* Renamed CLI options to match YAML fields.
Signed-off-by: Peter Štibraný <[email protected]>
* Removed 'caching' prefix from CLI options.
Regenerated docs.
Signed-off-by: Peter Štibraný <[email protected]>
* go mod tidy
Signed-off-by: Peter Štibraný <[email protected]>
* Rename MemcachedIndexCacheConfig to MemcachedClientConfig and move it to separate file.
Signed-off-by: Peter Štibraný <[email protected]>
* Use custom object for chunks cache configuration.
Signed-off-by: Peter Štibraný <[email protected]>
* Added short section on chunks cache.
Signed-off-by: Peter Štibraný <[email protected]>
* Update docs.
Signed-off-by: Peter Štibraný <[email protected]>
* Address review feedback.
Signed-off-by: Peter Štibraný <[email protected]>
*[ENHANCEMENT] Experimental TSDB: added the flag `-experimental.tsdb.wal-compression-enabled` to allow to enable TSDB WAL compression. #2585
77
+
*[ENHANCEMENT] Experimental TSDB: Querier and store-gateway components can now use so-called "caching bucket", which can currently cache fetched chunks into shared memcached server. #2572
77
78
*[BUGFIX] Ruler: Ensure temporary rule files with special characters are properly mapped and cleaned up. #2506
78
79
*[BUGFIX] Fixes #2411, Ensure requests are properly routed to the prometheus api embedded in the query if `-server.path-prefix` is set. #2372
79
80
*[BUGFIX] Experimental TSDB: fixed chunk data corruption when querying back series using the experimental blocks storage. #2400
Copy file name to clipboardExpand all lines: docs/operations/blocks-storage.md
+75-1Lines changed: 75 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Whenever the pool of compactors increase or decrease (ie. following up a scale u
74
74
75
75
## Index cache
76
76
77
-
The querier supports a cache to speed up postings and series lookups from TSDB blocks indexes. Two backends are supported:
77
+
The querier and store-gateway support a cache to speed up postings and series lookups from TSDB blocks indexes. Two backends are supported:
78
78
79
79
-`inmemory`
80
80
-`memcached`
@@ -103,6 +103,14 @@ For example, if you're running Memcached in Kubernetes, you may:
103
103
2. Create an [headless service](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services) for Memcached StatefulSet
104
104
3. Configure the Cortex's Memcached client address using the `dnssrvnoa+`[service discovery](../configuration/arguments.md#dns-service-discovery)
105
105
106
+
## Chunks cache
107
+
108
+
Store-gateway and querier also support cache for storing chunks fetched from storage. Chunks contain actual samples, and can be reused if user query hits the same series for the same time range.
109
+
110
+
To enable chunks cache, please set `-experimental.tsdb.bucket-store.chunks-cache.backend`. Chunks can currently only be stored into Memcached cache. Memcached client can be configured via flags with `-experimental.tsdb.bucket-store.chunks-cache.memcached` prefix.
111
+
112
+
There are additional low-level options for configuring chunks cache. Please refer to other flags with `experimental.tsdb.bucket-store.chunks-cache` prefix.
113
+
106
114
## Configuration
107
115
108
116
The general [configuration documentation](../configuration/_index.md) also applied to a Cortex cluster running the blocks storage, with few differences:
Copy file name to clipboardExpand all lines: docs/operations/blocks-storage.template
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Whenever the pool of compactors increase or decrease (ie. following up a scale u
74
74
75
75
## Index cache
76
76
77
-
The querier supports a cache to speed up postings and series lookups from TSDB blocks indexes. Two backends are supported:
77
+
The querier and store-gateway support a cache to speed up postings and series lookups from TSDB blocks indexes. Two backends are supported:
78
78
79
79
- `inmemory`
80
80
- `memcached`
@@ -103,6 +103,14 @@ For example, if you're running Memcached in Kubernetes, you may:
103
103
2. Create an [headless service](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services) for Memcached StatefulSet
104
104
3. Configure the Cortex's Memcached client address using the `dnssrvnoa+` [service discovery](../configuration/arguments.md#dns-service-discovery)
105
105
106
+
## Chunks cache
107
+
108
+
Store-gateway and querier also support cache for storing chunks fetched from storage. Chunks contain actual samples, and can be reused if user query hits the same series for the same time range.
109
+
110
+
To enable chunks cache, please set `-experimental.tsdb.bucket-store.chunks-cache.backend`. Chunks can currently only be stored into Memcached cache. Memcached client can be configured via flags with `-experimental.tsdb.bucket-store.chunks-cache.memcached` prefix.
111
+
112
+
There are additional low-level options for configuring chunks cache. Please refer to other flags with `experimental.tsdb.bucket-store.chunks-cache` prefix.
113
+
106
114
## Configuration
107
115
108
116
The general [configuration documentation](../configuration/_index.md) also applied to a Cortex cluster running the blocks storage, with few differences:
f.StringVar(&cfg.Backend, prefix+"backend", "", fmt.Sprintf("Backend for chunks cache, if not empty. Supported values: %s.", storecache.MemcachedBucketCacheProvider))
f.Int64Var(&cfg.SubrangeSize, prefix+"subrange-size", 16000, "Size of each subrange that bucket object is split into for better caching.")
33
+
f.IntVar(&cfg.MaxGetRangeRequests, prefix+"max-get-range-requests", 3, "Maximum number of sub-GetRange requests that a single GetRange request can be split into when fetching chunks. Zero or negative value = unlimited number of sub-requests.")
34
+
f.DurationVar(&cfg.ObjectSizeTTL, prefix+"object-size-ttl", 24*time.Hour, "TTL for caching object size for chunks.")
35
+
f.DurationVar(&cfg.SubrangeTTL, prefix+"subrange-ttl", 24*time.Hour, "TTL for caching individual chunks subranges.")
f.StringVar(&cfg.SyncDir, "experimental.tsdb.bucket-store.sync-dir", "tsdb-sync", "Directory to store synchronized TSDB index headers.")
190
192
f.DurationVar(&cfg.SyncInterval, "experimental.tsdb.bucket-store.sync-interval", 5*time.Minute, "How frequently scan the bucket to look for changes (new blocks shipped by ingesters and blocks removed by retention or compaction). 0 disables it.")
0 commit comments