fusionpbx load balancing


New Member
Nov 6, 2019
Dear Members.
Warm Greetings from me again. I need some information regarding my plan.
basically i am testing now the fusiionpbx for my commercial pbx project. looks amazing. but i want to setup it little different way. so thats why i need some help.

at the moment when i install fusionpbx from the bash script its do all in one job. so lets say if i have 100 customer and i want to put 5 customer to each machine i need to manage 20 server. and its big hassle to manage the 20 servers.

all i am thinking is to make one master fusionpbx server where the db will be installed. but i dont want any call working on that server. only registration and main functionality.

so at the moment i have 2 server.

server 1 = main fusionpbx gui + db
server 2= only freeswitch ( i want only 50 cc limit to that server)

as you can see in server 2 i want put 50cc limit that means if i need more CC then i will add 2nd freeswitch server.

this way more my business grows i will keep adding the freeswitch server ( i think thats way i want)

can someone guide me what i need to do in my scenario? do i need to install kamalio in the main fusionpbx server?

i am not new in VoIP or old in VoIP .. but i just can't understand what is the proper way i need to do

so basically looking for someone who can guide me what to do.

thanks a million in advance


Active Member
Jun 12, 2018
first off I would suggest deploying a more capable server. Unless the 5 customers per server are very large customers, there is no reason to limit a server to so few customers. It doesn't take a huge server to handle more than 50 concurrent calls if the bandwidth is available and you aren't transcoding or recording calls.

Multiple freeswitch servers can share a single database server, or you can also cluster the database server.
In your scenario, you would have a single point of failure if the database server went off line for any reason but would function.

A method many fusionpbx users deploy, and is taught in fusionpbx advanced training classes, is Postgres BDR clusters. There are some instructions posted somewhere in these forums as well as a github repository, but for the best understanding of how to it works and setup I would suggest signing up as a paid fusionpbx.com member and either watch a previous class videos or attend the next online class.


New Member
Nov 6, 2019
@sokalsondha If you can find someone to do this then give me a shout because I would like this too :)
sir thanks very much that you reply my post... i saw your few post earlier about the load balancing of fusionpbx.

basically i think i was wrong.. but now i came up with some different idea and may be that is possible...

I want to have one main fusionpbx setup with DB on it but not freeswitch for SIP registration or media..
all i want is

using multiple freeswitch server with one fusionpbx setup.
so my main fusionpbx server will only handle the db and core system but not handle sip registration or calls.

so when my customer will login to the device that verification will be done in the main fusionpbx server database..

in this way i will only need manage one database for all my servers and for my all customers.

just wondering is it possible?

also a 2GB server with 1 core CPU without transcoding or recording how many concurrent calls can be handle.?

i am talking about the digital ocean 5USD server. as just for reference.


Adrian Fretwell

Active Member
Aug 13, 2017
This may be of some interest to you:

We use Opensips a great deal for providing SIP trunks, and it is extremely flexible and stable. I personally have never used it with FreeSwitch/Fusion.
They key things with many of these kind of setups are:
1. Being able to share a common database (that is not a single point of failure).
2. Keeping filing systems in sync, for things like recordings etc.
3. Properly managing the recovery of a failed node.

I can't answer your "how many concurrent calls" question, but bear in mind that FreeSwitch is a highly threaded collection of processes. Most threads are I/O bound but transcoding and tone generation are pretty much all CPU intensive. Each call leg will have it's own thread, each SIP profile has management treads, worker threads (NAT keep alike, expired registrations etc.) and stack listener threads, Each event subsystem will have it's own threads. Playback and record will run in their own threads. So as you can see, a single core CPU will get busy quite quickly.

Basically, you don't know until you try, so run with what you propose and monitor your system performance / load. You can use top to monitor CPU usage, top -H will show individual threads. I tend to monitor my UDP performance by looking at /proc/net/udp (cat /proc/net/udp). This lists all open UDP sockets and shows the outbound and inbound queues in bytes. The rx_queue and tx_queue columns are the ones I look at, most of the time they will show zero or at least a fairly low value if the queues are being service properly and there is no bottleneck. netstat -lunp will show a similar listing. I also periodically look at netstat -su and check the RcvbufErrors.