-
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,71 @@ | ||||||
--- | ||||||
id: linux-redis-cache-penetration | ||||||
title: Linux 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' | ||||||
|
||||||
Linux Redis cache penetration 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. | ||||||
|
||||||
![Linux Redis cache penetration](./static/images/linux-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 /> | ||||||
|
||||||
### External packages | ||||||
This fault uses [`stress-ng`](https://github.com/ColinIanKing/stress-ng), which is installed as part of the infrastructure installation. | ||||||
|
||||||
### Optional tunables | ||||||
|
||||||
<table> | ||||||
<tr> | ||||||
<th> Tunable </th> | ||||||
<th> Description </th> | ||||||
<th> Notes </th> | ||||||
</tr> | ||||||
<tr> | ||||||
<td> requestCount </td> | ||||||
<td> Number of times to try to penetrate the Redis cache. </td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<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 times to penetrate the Redis cache. Its default value is 1000. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
The following YAML snippet illustrates the use of this input variable: | ||||||
|
||||||
[embedmd]:# (./static/manifests/linux-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: "" | ||||||
``` |
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="/path/to/redis/server" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
PASSWORD="password" | ||||||
TLS_AUTH_CERT="/path/tp/tls-cert" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
``` | ||||||
|
||||||
:::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. | `https://redis-server.com` | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only the FQDN is needed.
Suggested change
|
||||||
| 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` | |
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: "" |
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.