Load balance agents using HAproxy (WebRTC compatible?)

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Load balance agents using HAproxy (WebRTC compatible?)

Postby webudo » Mon Jun 08, 2020 8:53 pm

Hello everyone.

I'm running: ViciBox 9.0.2.(iso) | Asterisk 13.29.2-vici | VERSION: 2.14-755a BUILD: 200601-2129 | Cluster Setup: 1xMainDB 2xWeb/Tel 1xSlaveDB

I need to load balance web requests on 2 web/telephony servers on a cluster and I'm planning to use HAproxy for agents to point their browser to a floating IP address which will use round robbin and source IP persistence. Both servers have SSL certs for web and telephony.

The idea is to use ViciPhone so agents don't need a softphone and I don't need to configure two accounts for each agent, but I noticed that when creating a phone it only allows me to specify one of the two servers (I thought it could work as the carriers, which can be defined systemwide).

Can you please suggest any configuration that would allow me doing this?
In case I need to get rid of HAproxy and use any other method (keepalived, any?) please let me know.
I also don't know if the wss sessions can be "balanced" with one of those balancers?

Any idea is wellcome.

Thanks!
webudo
 
Posts: 32
Joined: Wed Nov 21, 2012 11:17 am

Re: Load balance agents using HAproxy (WebRTC compatible?)

Postby mflorell » Tue Jun 09, 2020 7:24 am

The first question is, how many agents is this system going to have to support?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Load balance agents using HAproxy (WebRTC compatible?)

Postby webudo » Tue Jun 09, 2020 1:54 pm

Thanks for replying Matt.
Between 120 and 200.
webudo
 
Posts: 32
Joined: Wed Nov 21, 2012 11:17 am

Re: Load balance agents using HAproxy (WebRTC compatible?)

Postby mflorell » Tue Jun 09, 2020 8:42 pm

You should be able to handle 200+ agents on a single dedicated webserver. We typically can handle over 240 before running into any issues.

If you do want to try load balancing, any method will work for VICIdial use, whether it's HAproxy or a simple IP balancing application or iptables configuration.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Load balance agents using HAproxy (WebRTC compatible?)

Postby webudo » Wed Jun 10, 2020 9:54 am

Even if running Web+Telephony on the server? That's good to know :)
This guys want to be prepared for growth and even after knowing that one single server would be enough they want to go with HA.

Can you suggest anything for me to configure WebRTC phones for the agent to be able to login wether he's on server A or server B?
I understand that a normal softphone scenario would need 2 registered accounts on the agent's softphone (800 and 800a for example) so when ViciDial dials the softphone it will reach it wether the HAproxy routed the agent to server A or server B.

Even experimental ideas are welcome ;)

Thanks!
webudo
 
Posts: 32
Joined: Wed Nov 21, 2012 11:17 am

Re: Load balance agents using HAproxy (WebRTC compatible?)

Postby webudo » Wed Jun 10, 2020 10:13 am

I bought the Manager manual and found interesting information on the "Phone Alias" section.
How would I apply those things when using ViciPhone? I understand that the ViciPhone registers after the agent logs in, so my question is if the ViciPhone will select the appropriate SIP account?
webudo
 
Posts: 32
Joined: Wed Nov 21, 2012 11:17 am

Re: Load balance agents using HAproxy (WebRTC compatible?)

Postby mflorell » Wed Jun 10, 2020 1:13 pm

No, you can't support 200+ web agents on a all-in-on server, the numbers I provided are based on a web-server-only machine. I should also mention that with VICIdial you can have as many web servers on a cluster as you want, and they don't have to be 'balanced' at all, so you have a lot of options there.

As for Phone Aliases, they work great for VICIphone, the agent screen will select the phone/server combination to use after login and will then register the phone.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 28 guests