Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <benye@amazon.com>
  • Loading branch information
yeya24 committed Oct 6, 2023
1 parent 57330d3 commit 1e2c1c8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/components/store.md
Expand Up @@ -291,14 +291,22 @@ type: IN-MEMORY
config:
max_size: 0
max_item_size: 0
<<<<<<< HEAD
enabled_items: []
=======
ttl: 0s
>>>>>>> 3b06b209 (update docs)
```

All the settings are **optional**:

- `max_size`: overall maximum number of bytes cache can contain. The value should be specified with a bytes unit (ie. `250MB`).
- `max_item_size`: maximum size of single item, in bytes. The value should be specified with a bytes unit (ie. `125MB`).
<<<<<<< HEAD
- `enabled_items`: selectively choose what types of items to cache. Supported values are `Postings`, `Series` and `ExpandedPostings`. By default, all items are cached.
=======
- `ttl`: this field doesn't do anything for inmemory cache.
>>>>>>> 3b06b209 (update docs)
### Memcached index cache

Expand All @@ -317,7 +325,11 @@ config:
max_get_multi_batch_size: 0
dns_provider_update_interval: 0s
auto_discovery: false
<<<<<<< HEAD
enabled_items: []
=======
ttl: 0s
>>>>>>> 3b06b209 (update docs)
```

The **required** settings are:
Expand All @@ -335,7 +347,11 @@ While the remaining settings are **optional**:
- `max_item_size`: maximum size of an item to be stored in memcached. This option should be set to the same value of memcached `-I` flag (defaults to 1MB) in order to avoid wasting network round trips to store items larger than the max item size allowed in memcached. If set to `0`, the item size is unlimited.
- `dns_provider_update_interval`: the DNS discovery update interval.
- `auto_discovery`: whether to use the auto-discovery mechanism for memcached.
<<<<<<< HEAD
- `enabled_items`: selectively choose what types of items to cache. Supported values are `Postings`, `Series` and `ExpandedPostings`. By default, all items are cached.
=======
- `ttl`: ttl to store index cache items in memcached.
>>>>>>> 3b06b209 (update docs)
### Redis index cache

Expand Down Expand Up @@ -367,6 +383,7 @@ config:
max_async_buffer_size: 10000
max_async_concurrency: 20
enabled_items: []
ttl: 0s
```

The **required** settings are:
Expand All @@ -383,6 +400,7 @@ While the remaining settings are **optional**:
- `write_timeout`: the redis write timeout.
- `cache_size` size of the in-memory cache used for client-side caching. Client-side caching is enabled when this value is not zero. See [official documentation](https://redis.io/docs/manual/client-side-caching/) for more. It is highly recommended to enable this so that Thanos Store would not need to continuously retrieve data from Redis for repeated requests of the same key(-s).
- `enabled_items`: selectively choose what types of items to cache. Supported values are `Postings`, `Series` and `ExpandedPostings`. By default, all items are cached.
- `ttl`: ttl to store index cache items in redis.

Here is an example of what effect client-side caching could have:

Expand Down

0 comments on commit 1e2c1c8

Please sign in to comment.