Files
fn_registry/dev/issues/completed/0168-matrix-livekit-udp-range-expand.md
T
egutierrez 00c7fc728e chore(issues): close 0167+0168+0169+0170 livekit hardening bundle
VPS commit: 8eef89b (egutierrez/element_matrix_chat)

- 0167: STUN leak fixed (use_external_ip:false + node_ip hardcoded)
- 0168: UDP range expanded 50000-50200 -> 50000-50500
- 0169: API secret rotated (old key LK44e009c6e92b -> new LK5f6b38bb)
- 0170: livekit.example.yaml refreshed + header comments cleaned

Verification:
- 0 STUN packets to Google during restart (tcpdump 60s window)
- Endpoint /livekit/sfu/ HTTP 200
- LiveKit logs: nodeIP=135.125.201.30, portICERange=[50000,50500]
- Containers livekit + livekit-jwt healthy

New secret stored in pass: matrix/livekit-secret-rotation-2026-05-25
2026-05-25 00:44:15 +02:00

59 lines
1.7 KiB
Markdown

---
id: "0168"
title: "Ampliar UDP range LiveKit de 200 a 500 ports"
status: pendiente
type: infra
domain:
- matrix
scope: app:element_matrix_chat
priority: baja
depends: []
blocks: []
related: ["0166"]
created: 2026-05-24
updated: 2026-05-24
tags: [matrix, livekit, scaling, webrtc]
---
# 0168 — Ampliar UDP range LiveKit de 200 a 500 ports
**Status:** pendiente
**Created:** 2026-05-24
**Type:** infra
**Priority:** baja
**Domain:** matrix
**Scope:** app:element_matrix_chat
**Depends:**
**Blocks:**
## Problema
LiveKit configurado con `port_range_start: 50000`, `port_range_end: 50200` (200 ports UDP). Cada participante usa ~2 ports → cap **~100 participantes concurrentes** sumando TODAS las calls del server. OK para uso personal hoy, justo si se anaden grupos simultaneos o reuniones >10 personas.
## Objetivo
Sostener al menos 250 participantes concurrentes sin port exhaustion.
## Plan
1. Editar `configs/livekit/livekit.yaml`: `port_range_end: 50500`.
2. Actualizar `docker-compose.yml` para exponer rango ampliado (300 puertos UDP adicionales).
3. Abrir rango en firewall VPS (UFW/iptables).
4. Restart stack LiveKit.
5. Smoke test: call funciona.
## Acceptance
- [ ] `docker port element_matrix_chat-livekit-1` muestra 50000-50500 UDP.
- [ ] `ss -lun | grep -c "0.0.0.0:50"` >= 500 tras restart.
- [ ] Call test OK.
## Definition of Done
- [ ] Repetibilidad: stack reinicia limpio.
## Notas
`docker-compose.yml` actualmente lista los 200 ports uno a uno (verboso pero explicito). Considerar usar sintaxis `"50000-50500:50000-50500/udp"` para legibilidad.
NO incrementar a >1000 sin medir consumo memoria LiveKit — cada port asignado tiene overhead minimo pero acumula.