Skip to content

Commit 75a5e59

Browse files
committed
chore(infra): disable caddy UDP 443 for ISSUE-29 phase 2
Refs: #29
1 parent 0d04947 commit 75a5e59

3 files changed

Lines changed: 119 additions & 4 deletions

File tree

docs/issues/ISSUE-29-research-high-cpu-load-after-udp-fix.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,14 @@ step.
9595

9696
### Phase 2 — First isolated experiment: disable HTTP/3
9797

98-
- [ ] Remove `"443:443/udp"` from the Caddy service in `server/opt/torrust/docker-compose.yml`.
99-
- [ ] Apply only that change on the live server and restart only Caddy.
98+
- [x] Remove `"443:443/udp"` from the Caddy service in `server/opt/torrust/docker-compose.yml`.
99+
- [x] Apply only that change on the live server and restart only Caddy.
100100
- [ ] Observe CPU, request rates, and external service health for an agreed window.
101101
- [ ] Decide whether Caddy CPU dropped materially enough to keep HTTP/3 disabled.
102102

103+
Execution and immediate post-change checks are recorded in
104+
`docs/issues/evidence/ISSUE-29/01-phase2-disable-http3-execution.md`.
105+
103106
Rationale: this is a small, isolated change that affects only HTTP/3/QUIC support and does not
104107
change normal HTTPS or the tracker's UDP listener on port 6969.
105108

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<!-- cspell:ignore CPUPerc -->
2+
3+
# ISSUE-29 Phase 2 Execution - Disable HTTP/3 UDP Port
4+
5+
## Context
6+
7+
- Issue: [#29](https://github.com/torrust/torrust-tracker-demo/issues/29)
8+
- Goal: perform the first isolated production change by removing Caddy UDP 443
9+
(`443:443/udp`) and restarting only Caddy.
10+
- Change timestamp (UTC): `2026-05-04T15:30:23Z` (edit) and
11+
`2026-05-04T15:30:45Z` (Caddy restart complete).
12+
13+
## Pre-Change Snapshot
14+
15+
Pre-change live checks confirmed:
16+
17+
- `/opt/torrust/docker-compose.yml` contained:
18+
19+
```yaml
20+
# HTTP/3 (QUIC)
21+
- "443:443/udp"
22+
```
23+
24+
- Host listener existed on UDP 443:
25+
26+
```text
27+
UNCONN 0 0 0.0.0.0:443 0.0.0.0:*
28+
UNCONN 0 0 [::]:443 [::]:*
29+
```
30+
31+
- Caddy published ports included UDP 443.
32+
33+
## Change Applied
34+
35+
### 1) Repository-side tracked config change
36+
37+
`server/opt/torrust/docker-compose.yml` was updated to remove the UDP publish
38+
line for Caddy while keeping TCP 80 and 443 unchanged.
39+
40+
### 2) Live server runtime change
41+
42+
On `demotracker`, in `/opt/torrust/docker-compose.yml`, the line
43+
`- "443:443/udp"` was removed and only Caddy was recreated:
44+
45+
```bash
46+
docker compose up -d caddy
47+
```
48+
49+
Live diff on server:
50+
51+
```diff
52+
# HTTPS
53+
- "443:443"
54+
# HTTP/3 (QUIC)
55+
-- "443:443/udp"
56+
```
57+
58+
## Immediate Post-Change Validation
59+
60+
### Service and port checks
61+
62+
- Caddy container status: `healthy` after recreation.
63+
- Host UDP 443 listener: not present after change.
64+
- HTTP tracker health endpoint:
65+
66+
```http
67+
GET https://http1.torrust-tracker-demo.com/health_check -> 200
68+
{"status":"Ok"}
69+
```
70+
71+
### API health note (not attributed to this change)
72+
73+
During immediate checks:
74+
75+
```http
76+
GET https://api.torrust-tracker-demo.com/health_check -> 500
77+
Unhandled rejection: Err { reason: "unauthorized" }
78+
```
79+
80+
Direct backend check from within Caddy to `tracker:1212/health_check` also
81+
returned HTTP 500 with `unauthorized`, indicating this is upstream API behavior
82+
at capture time, not a reverse-proxy-only failure introduced by the UDP 443
83+
change.
84+
85+
### Immediate post-change metrics sample
86+
87+
Capture timestamp (UTC): `2026-05-04T15:31:33Z`
88+
89+
- Host load average: `7.63 / 8.49 / 8.67`
90+
- `mpstat` all CPUs: `%usr=33.16`, `%sys=15.79`, `%soft=19.08`, `%idle=31.97`
91+
- `mpstat` CPU2: `%soft=98.02`, `%idle=1.98`
92+
- Container CPU snapshot:
93+
- `caddy`: `319.30%`
94+
- `tracker`: `100.78%`
95+
- `mysql`: `4.66%`
96+
- `grafana`: `0.27%`
97+
- `prometheus`: `0.00%`
98+
- Prometheus rates:
99+
- HTTP1 request rate: `1907.1684210526314 req/s`
100+
- UDP1 request rate: `2269.859649122807 req/s`
101+
102+
### External probe sample
103+
104+
From `https://newtrackon.com/raw` during this window:
105+
106+
- `https://http1.torrust-tracker-demo.com:443/announce` -> `Working`
107+
- `udp://udp1.torrust-tracker-demo.com:6969/announce` -> `Working`
108+
109+
## Next Step
110+
111+
Phase 2 observation remains open. Keep this single change in place and collect
112+
an agreed observation window before deciding whether to keep HTTP/3 disabled
113+
permanently or revert.

server/opt/torrust/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ services:
6363
- "80:80"
6464
# HTTPS
6565
- "443:443"
66-
# HTTP/3 (QUIC)
67-
- "443:443/udp"
66+
# HTTP/3 (QUIC) intentionally disabled during ISSUE-29 Phase 2 experiment
6867
volumes:
6968
- ./storage/caddy/etc/Caddyfile:/etc/caddy/Caddyfile:ro
7069
- ./storage/caddy/data:/data # TLS certificates (MUST persist!)

0 commit comments

Comments
 (0)