Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Updated Redis page #1378

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs_src/microservices/general/database/Ch-Redis.md
Original file line number Diff line number Diff line change
@@ -15,6 +15,19 @@ Redis uses a number of techniques to optimize memory utilization. Antirez and [R

## On-disk Persistence

Redis supports a number of different levels of on-disk persistence. By default, snapshots of the data are persisted every 60 seconds or after 1000 keys have changed. Beyond increasing the frequency of snapshots, append only files that log every database write are also supported. See https://redis.io/topics/persistence for a detailed discussion on how to balance the options.
Redis supports a number of different levels of on-disk persistence. By default, the configuration includes multiple save intervals:

Redis supports setting a memory usage limit and a policy on what to do if memory cannot be allocated for a write. See the MEMORY MANAGEMENT section of https://raw.githubusercontent.com/antirez/redis/5.0/redis.conf for the configuration options. Since EdgeX and Redis do not currently communicate on data evictions, you will need to use the EdgeX scheduler to control memory usage rather than a Redis eviction policy.
- After 1 hour, if at least 1 key has changed.
- After 5 minutes, if at least 100 keys have changed.
- After 1 minute, if at least 10,000 keys have changed.

This can be checked by running the command:
```shell
127.0.0.1:6379> CONFIG GET save
1) "save"
2) "3600 1 300 100 60 10000"
```

Beyond increasing the frequency of snapshots, append-only files that log every database write are also supported. See [Redis Persistence](https://redis.io/topics/persistence) for a detailed discussion on how to balance the options.

Redis supports setting a memory usage limit and a policy on what to do if memory cannot be allocated for a write. See the MEMORY MANAGEMENT section of [the Redis configuration file](https://raw.githubusercontent.com/antirez/redis/7.0/redis.conf) for the latest configuration options. Since EdgeX and Redis do not currently communicate on data evictions, you will need to use the EdgeX scheduler to control memory usage rather than a Redis eviction policy.