Load Balancing
Load balancing in VICIdial is the practice of distributing agent connections, web traffic, and call processing across multiple servers within a VICIdial cluster to prevent any single server from becoming overwhelmed. Load balancing enables horizontal scaling — adding more servers to handle more agents and calls — while maintaining performance and providing redundancy.
How It Works in VICIdial
VICIdial load balancing operates at multiple layers. Web load balancing distributes agent screen HTTP requests across multiple web servers using a reverse proxy (typically HAProxy, Nginx, or a cloud load balancer). This ensures that hundreds or thousands of agents can access the VICIdial interface without overloading a single web server.
Telephony load balancing distributes call processing across multiple Asterisk servers. VICIdial’s server assignment logic determines which Asterisk server handles each agent’s phone connection and each outbound call. The VICIDIAL_balance_active_calls.pl process monitors server loads and distributes calls accordingly. Agents are assigned to telephony servers based on capacity, and calls are originated on servers with available resources.
SIP trunk load balancing distributes outbound calls across multiple carriers or trunk groups using VICIdial’s dial prefix routing and carrier failover configuration. This prevents trunk saturation and provides carrier redundancy.
Why It Matters
Load balancing is essential for any VICIdial deployment exceeding a single server’s capacity — typically beyond 200-300 concurrent calls or 500+ agents. Without load balancing, all traffic funnels through one server, creating a single point of failure and a performance ceiling.
Effective load balancing provides both performance scaling and high availability. If one web server fails, the load balancer routes agents to surviving servers. If one telephony server fails, calls are placed through remaining servers. The database remains the critical single point of failure in most configurations, addressed by database replication. See the VICIdial cluster guide for load balancing architecture patterns.
Related Articles
Part of the VICIdial Performance Optimization Guide
Need Help With Your VICIdial Setup?
Get a free performance audit from our team of VICIdial experts. We'll identify quick wins and long-term improvements.
Get Your Free Audit →