-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHAOS-5571 Redis cache penetration #6814
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
docs/chaos-engineering/chaos-faults/linux/redis-cache-penetration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
id: redis-cache-penetration | ||
title: Redis cache penetration | ||
--- | ||
|
||
import Ossupport from './shared/note-supported-os.md' | ||
import FaultPermissions from './shared/fault-permissions.md' | ||
import AuthenticationDetails from './shared/redis-auth.md' | ||
|
||
Redis cache penetration fault continuously sends cache requests to the Redis database to find the value for a non-existing key. This continuous request reduces the performance of the application. | ||
|
||
![Redis cache penetration](./static/images/redis-cache-penetration.png) | ||
|
||
## Use cases | ||
- Slows down the database for responses to other requests. | ||
- Determines the resilience of Redis-dependant application when cache requests are continuously sent to a Redis database and they result in a cache miss. | ||
|
||
<Ossupport /> | ||
|
||
<FaultPermissions /> | ||
|
||
<AuthenticationDetails /> | ||
|
||
### Optional tunables | ||
|
||
<table> | ||
<tr> | ||
<th> Tunable </th> | ||
<th> Description </th> | ||
<th> Notes </th> | ||
</tr> | ||
<tr> | ||
<td> requestCount </td> | ||
<td> Number of requests to be sent for accessing the cache. </td> | ||
<td> Default: 1000. For more information, go to <a href="#number-of-requests"> request count. </a></td> | ||
</tr> | ||
<tr> | ||
<td> duration </td> | ||
<td> Duration through which chaos is injected into the target resource. Should be provided in <code>[numeric-hours]h[numeric-minutes]m[numeric-seconds]s</code> format. </td> | ||
<td> Default: <code>30s</code>. Examples: <code>1m25s</code>, <code>1h3m2s</code>, <code>1h3s</code>. For more information, go to <a href="/docs/chaos-engineering/chaos-faults/common-tunables-for-all-faults#duration-of-the-chaos">duration.</a></td> | ||
</tr> | ||
<tr> | ||
<td> rampTime </td> | ||
<td> Period to wait before and after injecting chaos. Should be provided in <code>[numeric-hours]h[numeric-minutes]m[numeric-seconds]s</code> format. </td> | ||
<td> Default: <code>0s</code>. Examples: <code>1m25s</code>, <code>1h3m2s</code>, <code>1h3s</code>. For more information, go to <a href="/docs/chaos-engineering/chaos-faults/common-tunables-for-all-faults#ramp-time">ramp time</a>. </td> | ||
</tr> | ||
</table> | ||
|
||
### Number of requests | ||
|
||
The `requestCount` input variable indicates the number of requests sent to access the Redis cache. Redis cache. Its default value is 1000. | ||
|
||
The following YAML snippet illustrates the use of this input variable: | ||
|
||
[embedmd]:# (./static/manifests/redis-cache-penetration/requests.yaml yaml) | ||
```yaml | ||
apiVersion: litmuchaos.io/v1alpha1 | ||
kind: LinuxFault | ||
metadata: | ||
name: redis-cache-penetration | ||
labels: | ||
name: cache-penetration | ||
spec: | ||
redisChaos/inputs: | ||
duration: 30s | ||
requestCount: 1000 | ||
rampTime: "" | ||
``` |
19 changes: 19 additions & 0 deletions
19
docs/chaos-engineering/chaos-faults/linux/shared/redis-auth.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Redis authentication | ||
The following authentication and connection details reside on the same machine where the chaos infrastructure is executed. These details are provided in the `/etc/linux-chaos-infrastructure/redis.env` file in the following format: | ||
|
||
``` | ||
ADDRESS="127.0.0.1:6379" | ||
PASSWORD="password" | ||
TLS_AUTH_CERT="/path/to/tls-cert" | ||
``` | ||
|
||
:::tip | ||
`PASSWORD` and `TLS_AUTH_CERT` are optional, whereas `ADDRESS` is a mandatory field. You need them only if you have configured your Redis database to facilitate it. | ||
::: | ||
|
||
|
||
| **ENV name** | **Description** | **Example** | | ||
|---------------|----------------------------------------------------------------|--------------------| | ||
| ADDRESS | Location where the Redis server is running. | `redis-server.com` | | ||
| PASSWORD | Password to connect to the Redis database. | `password` | | ||
| TLS_AUTH_CERT | File path to the location where the TLS certificate is stored. | `/path/to/file` | |
Binary file added
BIN
+272 KB
.../chaos-engineering/chaos-faults/linux/static/images/redis-cache-penetration.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
...aos-engineering/chaos-faults/linux/static/manifests/redis-cache-penetration/requests.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: litmuchaos.io/v1alpha1 | ||
kind: LinuxFault | ||
metadata: | ||
name: redis-cache-penetration | ||
labels: | ||
name: cache-penetration | ||
spec: | ||
redisChaos/inputs: | ||
duration: 30s | ||
requestCount: 1000 | ||
rampTime: "" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the hanging arrow