Several FusionPBX share the same database

Status
Not open for further replies.

Zivk

Member
Apr 7, 2019
35
6
8
63
We plan to have multiple instances of a FreeSWITCH-FusionPBX server, for redundancy and load balance. We want any instance to be able to accept calls for any of the domains in the configuration, and a sip proxy in the front will make sure that SIP messages of a specific domain always go to the same FreeSWITCH-FusionPBX machine.

My question: If we configure all the FreeSWITCH-FusionPBX instances to use the same database instance (MySQL in our case), will they work properly?
We modify the configuration on daily bases so database sync during night is not an option.

The problems I can think of are:
* Explicit external IP addresses in the Sip Profile, that should be different on each server
* Tables that aggregate data, like v_xml_cdr and v_database_transactions, may have issues of duplicate UUIDs or alike when updated from several servers

So is it possible? Or is there a better approach?

Thanks.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
509
180
43
50
FusionPBX official database is PostgreSQL. One good reason for this is PostgreSQL has native UUIDs datatypes, and stronger support for advanced SQL queries, better ANSI SQL support. PostgreSQL is also tested and maintained where MySQL is not tested or maintained.

Back to your primary question yes multiple FusionPBX can share the same database. Performance is best if they are in the same data center.
 

ad5ou

Active Member
Jun 12, 2018
892
205
43
The alternative to a single database server for multiple fusion/freeswitch servers is the method Mark teaches in the Fusionpbx advanced class which uses Postgres BDR (bi directional replication) Previous classes are recorded for viewing anytime for fusionpbx.com paid members.

With BDR, database servers can be geographically dispersed. The fusion/freeswitch servers can be on same machine as in a typical install or on a different server in same data center.

The replication with BDR is close enough to instant to work quite well for multiple Fusionpbx servers.
 

Zivk

Member
Apr 7, 2019
35
6
8
63
Thanks for the answers. Both central database and replicated database sound good, and I understand that there's nothing inherent that prevents us of continuing with this project. Good!
 
Status
Not open for further replies.