{"id":47754945,"url":"https://github.com/steadybit/extension-redis","last_synced_at":"2026-04-03T04:08:42.658Z","repository":{"id":340335471,"uuid":"1145866953","full_name":"steadybit/extension-redis","owner":"steadybit","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-17T15:24:37.000Z","size":354,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-18T00:51:17.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steadybit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-30T10:09:59.000Z","updated_at":"2026-03-17T15:24:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/steadybit/extension-redis","commit_stats":null,"previous_names":["steadybit/extension-redis"],"tags_count":7,"template":false,"template_full_name":"steadybit/extension-scaffold","purl":"pkg:github/steadybit/extension-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fextension-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fextension-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fextension-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fextension-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steadybit","download_url":"https://codeload.github.com/steadybit/extension-redis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fextension-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31333231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T03:20:36.090Z","status":"ssl_error","status_checked_at":"2026-04-03T03:20:35.133Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T04:08:41.903Z","updated_at":"2026-04-03T04:08:42.641Z","avatar_url":"https://github.com/steadybit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Steadybit extension-redis\n\nA [Steadybit](https://www.steadybit.com/) extension for Redis chaos engineering.\n\nLearn about the capabilities of this extension in our [Reliability Hub](https://hub.steadybit.com/).\n\n## Configuration\n\n| Environment Variable | Required | Description |\n|---------------------|----------|-------------|\n| `STEADYBIT_EXTENSION_ENDPOINTS_JSON` | Yes | JSON array of Redis endpoint configurations |\n| `STEADYBIT_EXTENSION_DISCOVERY_INTERVAL_INSTANCE_SECONDS` | No | Interval for instance discovery (default: 30) |\n| `STEADYBIT_EXTENSION_DISCOVERY_INTERVAL_DATABASE_SECONDS` | No | Interval for database discovery (default: 60) |\n\n### Endpoint Configuration\n\nThe `STEADYBIT_EXTENSION_ENDPOINTS_JSON` environment variable should contain a JSON array of Redis endpoint configurations:\n\n```json\n[\n  {\n    \"url\": \"redis://localhost:6379\",\n    \"password\": \"optional-password\",\n    \"username\": \"optional-username\",\n    \"db\": 0,\n    \"name\": \"my-redis-instance\",\n    \"insecureSkipVerify\": false\n  }\n]\n```\n\n### TLS Configuration\n\nFor TLS connections, use the `rediss://` URL scheme:\n\n```json\n[\n  {\n    \"url\": \"rediss://redis.example.com:6379\",\n    \"password\": \"secret\",\n    \"insecureSkipVerify\": true\n  }\n]\n```\n\n## Supported Targets\n\n### Redis Instance\n\nDiscovers Redis instances and exposes attributes like:\n- `redis.host` - Redis host\n- `redis.port` - Redis port\n- `redis.version` - Redis version\n- `redis.role` - Instance role (master/replica)\n- `redis.cluster.enabled` - Cluster mode status\n\n### Redis Database\n\nDiscovers Redis databases (db0-db15) and exposes:\n- `redis.database.index` - Database index\n- `redis.database.keys` - Key count in database\n- `redis.database.name` - Database name (e.g., \"db0\")\n\n## Supported Actions\n\n### Attacks\n\n#### Exhaust Connections\n- **ID**: `com.steadybit.extension_redis.instance.connection-exhaustion`\n- **Target**: Instance\n- **Description**: Opens many connections to test connection limit handling\n- **Parameters**:\n  - `duration` - How long to hold connections\n  - `numConnections` - Number of connections to open (default: 100)\n\n#### Pause Clients\n- **ID**: `com.steadybit.extension_redis.instance.client-pause`\n- **Target**: Instance\n- **Description**: Suspends all client command processing using CLIENT PAUSE\n- **Parameters**:\n  - `duration` - How long to pause clients\n  - `pauseMode` - ALL (all commands) or WRITE (write commands only)\n- **Reversibility**: Auto-reverts after timeout\n\n#### Limit MaxMemory\n- **ID**: `com.steadybit.extension_redis.instance.maxmemory-limit`\n- **Target**: Instance\n- **Description**: Reduces Redis maxmemory to force evictions or OOM errors\n- **Parameters**:\n  - `duration` - How long to apply the limit\n  - `maxmemory` - Memory limit (e.g., \"10mb\", \"1gb\")\n  - `evictionPolicy` - noeviction, allkeys-lru, allkeys-lfu, volatile-lru, volatile-ttl, or keep original\n- **Reversibility**: Fully reversible - restores original settings on stop\n\n#### Force Cache Expiration\n- **ID**: `com.steadybit.extension_redis.database.cache-expiration`\n- **Target**: Database\n- **Description**: Sets TTL on string keys matching a pattern to force expiration (non-string keys are skipped)\n- **Parameters**:\n  - `duration` - Attack duration (for tracking)\n  - `pattern` - Key pattern to match (only string keys are affected)\n  - `ttl` - TTL in seconds before keys expire (default: 5)\n  - `maxKeys` - Maximum keys to affect (default: 100)\n  - `restoreOnStop` - Restore keys with original values and TTLs when attack stops (default: false)\n- **Reversibility**: Reversible when `restoreOnStop` is enabled - recreates expired keys with original values and TTLs\n\n#### Stop Sentinel\n- **ID**: `com.steadybit.extension_redis.instance.sentinel-stop`\n- **Target**: Instance\n- **Description**: Stops a Redis Sentinel server using DEBUG SLEEP, making it unresponsive to all clients and other Sentinels\n- **Parameters**:\n  - `duration` - How long the Sentinel should be unresponsive (default: 30s)\n- **Reversibility**: Auto-recovers after the sleep duration\n\n### Checks\n\n#### Memory Usage Check\n- **ID**: `com.steadybit.extension_redis.instance.check-memory`\n- **Target**: Instance\n- **Description**: Monitors Redis memory usage and fails if threshold exceeded\n- **Parameters**:\n  - `duration` - Monitoring duration\n  - `maxMemoryPercent` - Max memory as % of maxmemory (default: 80%)\n  - `maxMemoryBytes` - Max memory in MB (optional)\n\n#### Latency Check\n- **ID**: `com.steadybit.extension_redis.instance.check-latency`\n- **Target**: Instance\n- **Description**: Monitors Redis response latency\n- **Parameters**:\n  - `duration` - Monitoring duration\n  - `maxLatencyMs` - Maximum allowed latency in ms (default: 100)\n\n#### Connection Count Check\n- **ID**: `com.steadybit.extension_redis.instance.check-connections`\n- **Target**: Instance\n- **Description**: Monitors connected clients and fails if threshold exceeded\n- **Parameters**:\n  - `duration` - Monitoring duration\n  - `maxConnectionsPct` - Max connections as % of maxclients (default: 80%)\n  - `maxConnections` - Absolute max connections (optional)\n\n#### Replication Lag Check\n- **ID**: `com.steadybit.extension_redis.instance.check-replication`\n- **Target**: Instance\n- **Description**: Monitors Redis replication status and lag for replicas\n- **Parameters**:\n  - `duration` - Monitoring duration\n  - `maxLagSeconds` - Maximum allowed replication lag (default: 10s)\n  - `requireLinkUp` - Fail if master link is down (default: true)\n\n## Demo Environment \u0026 Chaos Experiments\n\nA complete demo environment with a sample application and chaos engineering experiments is available in the `demo/` directory.\n\n### Quick Start\n\n```bash\ncd demo\ndocker-compose up -d\n```\n\nThis starts:\n- **redis-master**: Primary Redis (port 6379)\n- **redis-replica**: Replica for HA testing (port 6380)\n- **demo-app**: Sample app with caching (port 3400)\n- **load-generator**: Continuous traffic generator\n\n### Chaos Experiments\n\nSee [demo/CHAOS_EXPERIMENTS.md](demo/CHAOS_EXPERIMENTS.md) for detailed chaos engineering scenarios including:\n\n**User-Facing Scenarios:**\n- Cache unavailability impact\n- Session loss handling\n- Slow cache response\n- Cache stampede (thundering herd)\n\n**SRE/Platform Scenarios:**\n- Connection pool exhaustion\n- Memory pressure \u0026 eviction\n- Replication lag\n- Redis failover\n\n## Installation\n\n### Helm\n\n```bash\nhelm repo add steadybit https://steadybit.github.io/helm-charts\nhelm repo update\nhelm install steadybit-extension-redis steadybit/steadybit-extension-redis \\\n  --set redis.auth.managementEndpoints='[{\"url\":\"redis://redis:6379\"}]'\n```\n\n### Docker\n\n```bash\ndocker run -d \\\n  -e STEADYBIT_EXTENSION_ENDPOINTS_JSON='[{\"url\":\"redis://redis:6379\"}]' \\\n  -p 8083:8083 \\\n  ghcr.io/steadybit/extension-redis:latest\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.25+\n- Redis instance for testing\n- Docker (for demo environment)\n\n### Build\n\n```bash\nmake build\n```\n\n### Test\n\n```bash\n# Unit tests only\ngo test ./clients/... ./config/... ./extredis/... -v\n\n# All tests including e2e (requires minikube)\nmake test\n```\n\n### Run locally\n\n```bash\n# Start Redis\n./scripts/start-redis.sh\n\n# Run extension\nexport STEADYBIT_EXTENSION_ENDPOINTS_JSON='[{\"url\":\"redis://localhost:6379\",\"password\":\"dev-password\"}]'\nmake run\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadybit%2Fextension-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteadybit%2Fextension-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadybit%2Fextension-redis/lists"}