Lavalink Gateway Architecture
The managed connection layer providing load balancing, health monitoring, failover, and IP masking for Lavalink clusters.
Management Portal: https://lava.musiva.app/
Connection Host: gateway.musiva.app (Port: 443, Secure: true)
The Lavalink Gateway is Musiva's central connection broker sitting between Discord music bots and the underlying fleet of Lavalink audio servers.
Instead of connecting directly to an individual Lavalink server IP, all bot instances establish a single WebSocket connection to the Gateway.
Why Use a Gateway Instead of a Simple Proxy?
A simple TCP/HTTP reverse proxy only forwards raw traffic to a single backend target. The Musiva Lavalink Gateway is protocol-aware and inspects Lavalink WebSocket payloads to provide high-level orchestration:
┌──────────────────────────────────────────────────────────┐
│ Lavalink Gateway │
├────────────────────────────┬─────────────────────────────┤
│ • Dynamic Node Selection │ • Automated Failover │
│ • Health & Latency Probing │ • Rolling Maintenance Mode │
│ • Player Session Tracking │ • Track-Play Quota Counters │
│ • Free / Premium Access │ • Origin Node IP Shielding │
└────────────────────────────┴─────────────────────────────┘Infrastructure Security & IP Masking
Connecting music bots directly to raw VPS or dedicated server IP addresses creates operational vulnerabilities:
- DDoS Exposure: A targeted attack on an exposed server IP disables all music players running on that host.
- Provider Bans: If an individual server IP is rate-limited by upstream services, the bot's configuration must be modified and restarted.
- Configuration Rigidity: Scaling from 2 servers to 10 requires updating every bot cluster.
The Gateway Solution:
Clients connect exclusively to:
gateway.musiva.app:443 (WSS)The underlying backend servers (Node A, Node B, Node C) reside entirely inside private networks or restricted firewalls that only accept traffic from the Gateway's origin IP addresses.
Nodes can be added, decommissioned, or upgraded at will without altering any Discord bot configurations.