Need to configure load balancing between 2 asterisk servers.

All installation and configuration problems and questions

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

Need to configure load balancing between 2 asterisk servers.

Postby jaydeep.zala » Mon Jul 08, 2019 12:31 am

Hi,
I've created a ViciBox cluster of 3 servers. The version of ViciBox is v.8.1.2 same on all.
One is used for WEB & DB, two servers are used as Asterisk Dialler.
After that created 5 users and 5 phones as required.
and register 4 users on asterisk server-1 and 1 user on asterisk server-2.
To check the load balancing works or not I log in through all the users and calls are working fine. But I see Load balance does not work properly, all the calls are coming on asterisk server-1 where 4 users are registered, No calls are passing to another asterisk server which is having only one call.
Can anyone please let me know how the load balance makes working in this cluster, I need to Create a working Load balance between both of the asterisk server.
Thanks,
Jaydeep Zala
jaydeep.zala
 
Posts: 5
Joined: Thu Jul 04, 2019 8:14 am

Re: Need to configure load balancing between 2 asterisk serv

Postby williamconley » Tue Jul 09, 2019 11:41 pm

Good job posting your installer version. Please remember to always post your Full Vicidial Version with Build on all posts. Any version of Vicidial can be installed with any version of Vicibox (the installer), so posting the installer doesn't take care of the Vicidial Version. 8-)

Vicidial asterisk server load balancing is managed by using phone aliases. Look it up in the manual. The gist of it is that there will be one entry in admin->phones for each server and a Phone Alias which links the two. The agent will log in with the alias, not with one of the individual phones. Vicidial's login script will choose the server that will call the agent, which will balance the load.

This requires that the agent's soft phone be registered to BOTH asterisk servers with those two "linked" phones of the phone alias they used to log in.

There is also a "bulk phone insert page" in "Reports->Admin Utilities" (link at the bottom of the reports page) which can be used to create the balanced phones with their aliases. You'll get it wrong a couple times, if you do be sure to delete all the aliases and phones and try again. Don't make more than one or two to begin with until you get it right. lol

[edit - moved to Support board as this is obviously a support question, deleted duplicate topic]
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need to configure load balancing between 2 asterisk serv

Postby jaydeep.zala » Thu Jul 11, 2019 4:15 am

Hi William,
Thanks for the reply, I followed your step and also get success to load balance auto registrations of phones which we've added in phone alias.
they are distributed between both the servers.
But I need the Load balance which described in the following link:- "http://vicidial.org/docs/LOAD_BALANCING.txt"

I followed the steps but didn't get the required load balance between the dialler servers.
Can you please provide some guidance to make the load balance as described in above link make happen, because I need Load Balance Overflow & Load Balanced type of balancing between the two asterisk diallers.

Thanks,
Jaydeep Zala
jaydeep.zala
 
Posts: 5
Joined: Thu Jul 04, 2019 8:14 am

Re: Need to configure load balancing between 2 asterisk serv

Postby williamconley » Thu Jul 11, 2019 11:59 am

but didn't get the required load balance between the dialler servers


A little vague, IMHO. What are your symptoms?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need to configure load balancing between 2 asterisk serv

Postby jaydeep.zala » Fri Jul 12, 2019 1:06 am

Let me Explain the load balancing I'm trying to set up.
I'm using Webrtc so, multiple logins of phones is not possible,
I find AGI script which is mentioned in this document -> "http://vicidial.org/docs/LOAD_BALANCING.txt"
please check 5th step "Load-Balance and Load-Balance-Overflow AGI scripts"

After the 9th step, there's configuration to do Load balance between three servers with using IAX2 friends.
I did the same configuration between two asterisk server as described but load balancing not working.
AGI script is called while login the user but the calls do not distribute between both Asterisk servers.
If you have a proper configuration for the load balancing I'm trying to set up, Please suggest it to me.

Thanks,
Jaydeep Zala
jaydeep.zala
 
Posts: 5
Joined: Thu Jul 04, 2019 8:14 am

Re: Need to configure load balancing between 2 asterisk serv

Postby jaydeep.zala » Mon Jul 15, 2019 8:00 am

Can you please guide me with this load balancing?
I'm really stuck in this configuration.
jaydeep.zala
 
Posts: 5
Joined: Thu Jul 04, 2019 8:14 am

Re: Need to configure load balancing between 2 asterisk serv

Postby williamconley » Wed Jul 17, 2019 8:45 pm

williamconley wrote:Good job posting your installer version. Please remember to always post your Full Vicidial Version with Build on all posts. Any version of Vicidial can be installed with any version of Vicibox (the installer), so posting the installer doesn't take care of the Vicidial Version. 8-)


From above step one in the document you linked:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
AS OF RELEASE 2.2.0 YOU SHOULD NOT HAVE TO TAKE ANY STEPS BEYOND STEP 2 IN THIS DOCUMENT TO GET MULTI-SERVER VICIDIAL TO WORK IF YOU ARE USING THE DEFAULT VICIDIAL CONF FILES.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Vicidial Version 2.2.0 is ... Very Very Old. Which makes that document pretty much obsolete.

If your phones are web-based, you may want to look at a simple web-load-balancer. Alternate each agent from one server to the next during login.

We have a more complex agent web balancer, combined with a listing page for all the agents logged in to each web server, and a weighted system modification to allow some servers to take more load while others take less. For those who have enterprise level systems, this became a necessity. Our balancer will count agents on each web server presently and bounce the agent to the least used server at the moment of login. It will also bounce them back to the balancer for relogin IF they used the balancer to log in.

But for your purposes, a simple alternating web server php page would likely suffice to balance the web server load.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need to configure load balancing between 2 asterisk serv

Postby jaydeep.zala » Thu Jul 18, 2019 2:09 am

williamconley wrote:
williamconley wrote:Good job posting your installer version. Please remember to always post your Full Vicidial Version with Build on all posts. Any version of Vicidial can be installed with any version of Vicibox (the installer), so posting the installer doesn't take care of the Vicidial Version. 8-)


Hi
We're using Vicidial VERSION: 2.14-714a & BUILD: 190628-1511.

We have a more complex agent web balancer, combined with a listing page for all the agents logged in to each web server, and a weighted system modification to allow some servers to take more load while others take less. For those who have enterprise level systems, this became a necessity. Our balancer will count agents on each web server presently and bounce the agent to the least used server at the moment of login. It will also bounce them back to the balancer for relogin IF they used the balancer to log in.


Do you have any reference document or any blog for the configuration you've mentioned here, I really appreciate your support in this endeavor.

Thanks,
Jaydeep Zala
jaydeep.zala
 
Posts: 5
Joined: Thu Jul 04, 2019 8:14 am

Re: Need to configure load balancing between 2 asterisk serv

Postby williamconley » Thu Jul 18, 2019 2:13 am

I'm not sure if there is a generic web balancer anywhere in the Vicidial installers, but web load balancing/alternating between multiple web pages is a fairly standard "easy to do" web function. PHP handles it easily. There must be lots of places that have examples. Note that this is not a vicidial thing: it's just a web page that bounces to other web pages and rotates among them. One "redirect" page and it will redirect to a different agent web login page each time someone hits it (or based on whether the "seconds" is presently even or odd ... or any other way you feel like doing it). Then you give the agents the redirect page instead of the regular Vicidial login page and voila! You're balancing.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 100 guests