-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathdocker-compose.probe-test.yml
More file actions
75 lines (72 loc) · 2.55 KB
/
docker-compose.probe-test.yml
File metadata and controls
75 lines (72 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
services:
# Valkey with the default user (devpassword) PLUS a 'noMon' ACL user
# that lacks MONITOR and COMMAND. Connect with username=noMon /
# password=limited from the app to drive the probe through both
# layers and observe a definitive 'no' verdict.
valkey-no-monitor:
image: valkey/valkey:8-alpine
container_name: betterdb-probe-valkey-no-monitor
ports:
- "6395:6379"
command: valkey-server --aclfile /etc/valkey/users.acl
volumes:
- ./scripts/probe-test-users.acl:/etc/valkey/users.acl:ro
healthcheck:
test: ["CMD", "valkey-cli", "-a", "devpassword", "ping"]
interval: 5s
timeout: 3s
retries: 3
# Same setup on Redis — covers ACL-parser drift between Redis and
# Valkey on the same MONITOR-rejection error shapes.
redis-no-monitor:
image: redis:8-alpine
container_name: betterdb-probe-redis-no-monitor
ports:
- "6397:6379"
command: redis-server --aclfile /etc/redis/users.acl
volumes:
- ./scripts/probe-test-users.acl:/etc/redis/users.acl:ro
healthcheck:
test: ["CMD", "redis-cli", "-a", "devpassword", "ping"]
interval: 5s
timeout: 3s
retries: 3
# Healthy Valkey upstream, reachable only through toxiproxy. Used to
# verify the 'unknown' verdict for transient duplicate-socket failures
# and that 'unknown' is not cached. Not exposed to the host.
valkey-toxic-upstream:
image: valkey/valkey:8-alpine
container_name: betterdb-probe-valkey-tox-upstream
# COMMAND renamed away so layer 1 (COMMAND INFO MONITOR) is
# inconclusive and the probe always escalates to the live MONITOR
# layer — that's the layer the bug lives in.
command:
- valkey-server
- --requirepass
- devpassword
- --rename-command
- COMMAND
- ""
expose:
- "6379"
healthcheck:
test: ["CMD", "valkey-cli", "-a", "devpassword", "ping"]
interval: 5s
timeout: 3s
retries: 3
# Fault-injection proxy in front of valkey-toxic-upstream.
# Connect the app to localhost:6398. Inject toxics via the admin
# API at http://localhost:8474. See docs/dev/verify-monitor-probe.md
# for the curl recipes (reset_peer, latency, etc.).
toxiproxy:
image: ghcr.io/shopify/toxiproxy:2.9.0
container_name: betterdb-probe-toxiproxy
command: -host 0.0.0.0 -config /config/toxiproxy.json
ports:
- "6398:6398"
- "8474:8474"
volumes:
- ./scripts/toxiproxy-probe.json:/config/toxiproxy.json:ro
depends_on:
valkey-toxic-upstream:
condition: service_healthy