API calls increases server load

All installation and configuration problems and questions

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

API calls increases server load

Postby baijumps » Thu Sep 17, 2020 7:39 am

Hi

i have implemented the ViCi Dial API calls to make out going call and recording
noticed that the ViCi Dial server gets full utilization becacsue of lot of request is hitting to the server, because of that server load is going high exceptionally http load.

calling the below APIs in the below sequence

external_dial
recording
external_hangup
recording
external_status


is there any other configurations to be done at ViCi Dial to make self destryong the API calls after ending the calls and records?
Please help, thanks in advance
baijumps
 
Posts: 7
Joined: Fri Jul 24, 2020 7:59 am

Re: API calls increases server load

Postby mflorell » Thu Sep 17, 2020 8:22 am

Get another webserver to add to your cluster.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: API calls increases server load

Postby baijumps » Thu Sep 17, 2020 9:39 am

thank you mflorell for the suggestion,
But in the campaign only 13 users are using. server is Xeon server with 32 GB RAM

apart from calling the API for "dial" and "hangup", do we need to do any process to end the session created by the user after "hangup" API call to free the resources.

Thanks in advance.
baijumps
 
Posts: 7
Joined: Fri Jul 24, 2020 7:59 am

Re: API calls increases server load

Postby mflorell » Thu Sep 17, 2020 12:09 pm

The number of users is only one part of what generates load. The number of phone lines you are using, the average call length, the SIP codec used and several other factors including the type of drives in your server and how it was installed all play a part in how loaded the server is. Usually the issue is related to the database, and more specifically the hardware used for the drive subsystem.

That said, we have clients with hundreds of agents heavily using the API without issues on a properly configured cluster of VICIdial servers.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: API calls increases server load

Postby baijumps » Mon Sep 21, 2020 12:20 am

thank you, mflorell for the suggestions.

We have found that there is n number of calls to the ViCi dial sever once made a API call for "external_dial", which looks like it checking the call is still on or not. it calls the ViCi dial Server around 60 to 70 times in minute from the Web application sever.

is there any specific parameter to be passed while calling "external_dial" API to avoid this, or if some specific configuration in the ViCi dial server will help to reduce the HTTP requests which causes the higher number of HTTP call to the ViCi dial


further here is a log of requreste

IP ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562 > vici_ip.http: S 1529878838:1529878838(0) win 29200 <mss 1460,nop,nop,sackOK,nop,wscale 7>
IP vici_ip.http > ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562: S 344449882:344449882(0) ack 1529878839 win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 7>
IP ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562 > vici_ip.http: . ack 1 win 229
IP ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562 > vici_ip.http: P 1:242(241) ack 1 win 229
IP vici_ip.http > ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562: . ack 242 win 54
IP vici_ip.http > ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562: P 1:339(338) ack 242 win 54
IP vici_ip.http > ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562: F 339:339(0) ack 242 win 54
IP ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562 > vici_ip.http: . ack 339 win 237
IP ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562 > vici_ip.http: F 242:242(0) ack 340 win 237
IP vici_ip.http > ip-xxx-xxx-xxx-xxx.ip.secureserver.net.41562: . ack 243 win 54

**vici_ip.http is ViCi Box server IP
**ip-xxx-xxx-xxx-xxx is WebApp Server
thanks in advance.
baijumps
 
Posts: 7
Joined: Fri Jul 24, 2020 7:59 am

Re: API calls increases server load

Postby mflorell » Mon Sep 21, 2020 8:24 am

Those call-status HTTP AJAX requests have nothing specifically to do with the API external_dial call, they will happen with any manual dial call through the agent screen whether you use the API or not.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: API calls increases server load

Postby baijumps » Wed Sep 23, 2020 2:56 am

Thank you mflorell, for the clarification.
I guess I may need to tune the webserver on the ViCi Box. if so any hint to help?

thanks
baijumps
 
Posts: 7
Joined: Fri Jul 24, 2020 7:59 am

Re: API calls increases server load

Postby mflorell » Wed Sep 23, 2020 3:22 pm

If you have everything on a single server(DB, Web, dialer) then there isn't much to tune on the apache side without causing issues with the other services. What we recommend at that point is to get a dedicated web server, then you can increase the available threads and Linux open-files and several other parameters that affect Apache httpd.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: API calls increases server load

Postby baijumps » Fri Sep 25, 2020 12:23 pm

Thank you for teh suggestions, mflorell.
am having my web application and database on one server and ViCi box on separate dedicated server.
I would like to get clarify one more doubt related to autodialing with ViCi dial API
As I couldn't see any APIs to implement the autodial feature, how do we achieve this or am missing some APIs for that?

Thank you so much.
baijumps
 
Posts: 7
Joined: Fri Jul 24, 2020 7:59 am

Re: API calls increases server load

Postby williamconley » Fri Sep 25, 2020 3:06 pm

Autodial is not an API. Vicidial is designed for agents to LOG IN and the dialer is then interacting with those logged in agents. Their web interface continually notifies the dialer of their status and interacts with the database and their activity is tracked constantly. The Vicidial system is designed around that "agent status and activity" and the dialer will keep those agents ON The Phone as much as possible.

That being said: There is a "Remote Agents" option which can be activated (via api if you like) to cause agents that are NOT logged in to receive calls. Vicidial treats them just like logged in agents, but the Remote Agent controls within Vicidial simulate an agent without the agent actually being logged in via a web browser.

If you're trying to implement Vicidial for its ability to transfer calls to a remote call center (Vicidial makes calls, and transfers them to the other call center or call centers) or if you want to broadcast a political message, this is the method you would use.

In ALL cases, the best advice I can give you is to start at page one of the Vicidial Manager's Manual and do not skip anything or stop until the dialer is working with all the functions you want/need. You may learn a few things you con't care about, but don't skip them as many early "I don't need this" feature turn out to be necessary later on, and without them you fail and have no idea why. That lost time is generally much higher than NOT skipping any pages. A newbie can go from "download" to "fully functioning" overnight even if he's fresh out of high school. 8-)

Happy Hunting!

PS: Apache has a limit on available usable sockets which is rather low for no reason. If you run out of sockets, just increase them unless your server CPU is overloading. If you're not sure ... enable the status_module in apache. That will allow you to see available, idle, busy sockets.
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: 20018
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 74 guests