Apr 17 2009

Load Balancing Asterisk Servers

Category: AsteriskBipin Balakrishnan @ 6:31 pm

high-server-load-wordpress.jpg

Some of  common question among the asterisk users  are.

  • What is the minimum hardware to setup asterisk ?
  • How many simultaneous call can asterisk machine can handle?
  • How many E1s can be plugged to a single machine?
  • Which is the best server for call making?
  • How an asterisk machine can be tuned?

Lets start to Discuss from one by one.

Minimum Hardware to setup Asterisk

The answer is simple.All we need is a normal PC installed with any of the Linux flavour in it and a lan card  if we are trying to make SIP calls only.Not a single extra hard ware required.

How to make asterisk sip calls, i have mentioned in my previous posts.

Simultaneous call can asterisk machine can handle / Max E1s

Asterisk 1.2 start to run into problems around 220 concurrent SIP calls. Asterisk 1.4 scales much better and can handle nearly double the call setups/second as well as total concurrent traffic with a hard ware of dual core processor with 4GB RAM

Digium  claims asterisk can  handle up to 240 calls simultaneous in both SIP/ Zap channels.I have experience of setting of server for outdialing application which can make 240 simultaneous calls at a time, ie with 2 quad span card connected to 8 PRI lines.

Hardware configiration is :

Server : IBM System x3400

Card : Digium TE420P

RAM : 4GB

Processor : Dual-Core Intel Xeon Processor

Best server for call making

I have tried IBM System x3400, HP Proliant 110 G4 ,  IBM System x3200 for our IVR and outdialing application which handles minimum of 120 calls at a time and its running smooth without any issues.

Tuning asterisk Machine

The best practice to make your asterisk sever to get it maximum performance are

Try to implement almost every logic in dailplan itself.

Dial Plans are just like shell script, we can implement almost all our logic with it.Go forAGI if and only if we are 100% sure that i cant be done with dail plan only.The communication between the AGI scripts and Asterisk was via standard input and standard output writing and reading cause a large memory and CPU usage.

Turn off Log files.

Asterisk uses a too many log files while running.Logs files are good when used for debugging but once we got a stable asterisk running you can turn it off or make log rotate to empty log file once in a week.This will make huge difference in the load in the machine.

Can tun off the logging by editing /etc/asterisk/asterisk.conf also.

Tune mysql to its best

If we are using MySQL as our DB in the AGI scripts tuning will give us better performance. It can be done  indexing in tables,increasing concurrent connection parameter, threading parameter in the my.cnf file

Use FastAGI

Implements the Asterisk Gateway Interface (AGI) over TCP sockets. This can help alleviate CPU load on your telephony server by relocating resource hungry scripts to another networked server. In order to instruct Asterisk to attempt a network connection, you must supply the hostname or IP address of the server where your FastAGI service is hosted and preface it with agi://:

Those having similar experience  can share their questions and experiences here….:)

Tags: , ,