System information

Replicated Databases
Using a replicated database provides some redundancy in the backend to help limit the
amount of downtime callers and agents experience if a database failure occurs. A
master-master database configuration is required so that data can be written to either
database and be automatically replicated to the other system, ensuring that we have an
exact copy of the data on two physical machines. Another advantage to this approach
is that a single system no longer needs to handle all the transactions to the database;
the load can be divided among the servers. Figure 22-5 illustrates this distributed design.
Figure 22-5. Asterisk database integration, distributed database
We’ve used MySQL master-master replication before, and it works
quite well. It also isn’t all that difficult to set up, and several tutorials
exist on the Internet. Other database systems will likely contain this
functionality as well, especially if you’re using a commercial system such
as Oracle or MS SQL.
Failover can be done natively in Asterisk, as res_odbc and func_odbc do contain con-
figuration options that allow you to specify multiple databases. In res_odbc, you can
Asterisk and Database Integration | 495