All; I know that there are probably several solutions to this problem, but what I am trying to do is provide some redundancy for my customers CDR data. I know that doing simple backups of MySQL is probably the easiest way to go, but I'm thinking that there may be some benefit to simultaneously writing the CDR data to multiple servers at once. However, I'm drawing a blank on this one. Has anyone else done this before? Any insight at all would be greatly appreciated. Thanks Much; John V. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170619/2878da1d/attachment.html>
Chris Bagnall
2017-Jun-19 16:12 UTC
[asterisk-users] Writing CDR's to two database servers
On 19/6/17 4:47 pm, Tech Support wrote:> I know that there are probably several solutions to this problem, but > what I am trying to do is provide some redundancy for my customers CDR data. > I know that doing simple backups of MySQL is probably the easiest way to go, > but I'm thinking that there may be some benefit to simultaneously writing > the CDR data to multiple servers at once. However, I'm drawing a blank on > this one. Has anyone else done this before? Any insight at all would be > greatly appreciated.You could - if you really wanted - use two different cdr_ modules to write to, for example, a MySQL and a PostgreSQL database simultaneously. Having said that, and given nearly every modern DBMS has its own replication built-in, you'd be far better off using that. There are good instructions online for MySQL and PostgreSQL - and no doubt for other DBMSs as well. Kind regards, Chris -- This email is made from 100% recycled electrons
Sebastian Gutierrez
2017-Jun-19 16:12 UTC
[asterisk-users] Writing CDR's to two database servers
use replication best regards> On Jun 19, 2017, at 17:47, Tech Support <asterisk at voipbusiness.us> wrote: > > All; > I know that there are probably several solutions to this problem, but what I am trying to do is provide some redundancy for my customers CDR data. I know that doing simple backups of MySQL is probably the easiest way to go, but I?m thinking that there may be some benefit to simultaneously writing the CDR data to multiple servers at once. However, I?m drawing a blank on this one. Has anyone else done this before? Any insight at all would be greatly appreciated. > Thanks Much; > John V. > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com <http://www.api-digital.com/> -- > > Check out the new Asterisk community forum at: https://community.asterisk.org/ <https://community.asterisk.org/> > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started <https://wiki.asterisk.org/wiki/display/AST/Getting+Started> > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users <http://lists.digium.com/mailman/listinfo/asterisk-users>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170619/75695d13/attachment.html>
On Monday 19 June 2017 at 18:12:35, Sebastian Gutierrez wrote:> use replication1. Agreed - use replication. 2. If you want an HA (High Availability, not dependent on a single Master DB server replicating to a slave) solution, consider setting up Master-Master replication, with an LVS (Linux Virtual Server) HA machine in front of the two, so that writes can go to either server using only a single IP address configured in Asterisk. Then, if one fails, you can still write to (and read from) the other, repair the failed one, and restore replication. Antony> > On Jun 19, 2017, at 17:47, Tech Support <asterisk at voipbusiness.us> wrote: > > > > All; > > > > I know that there are probably several solutions to this problem, but > > what I am trying to do is provide some redundancy for my customers > > CDR data. I know that doing simple backups of MySQL is probably the > > easiest way to go, but I?m thinking that there may be some benefit > > to simultaneously writing the CDR data to multiple servers at once. > > However, I?m drawing a blank on this one. Has anyone else done this > > before? Any insight at all would be greatly appreciated. > > > > Thanks Much; > > John V.-- Atheism is a non-prophet-making organisation. Please reply to the list; please *don't* CC me.
On Mon, Jun 19, 2017 at 11:47:04AM -0400, Tech Support wrote:> I know that there are probably several solutions to this problem, but > what I am trying to do is provide some redundancy for my customers CDR data. > I know that doing simple backups of MySQL is probably the easiest way to go, > but I'm thinking that there may be some benefit to simultaneously writing > the CDR data to multiple servers at once. However, I'm drawing a blank on > this one. Has anyone else done this before? Any insight at all would be > greatly appreciated.Beside the already mentioned solutions, you could take a look at a multi-master setup like a Galera Mysql cluster. Works perfectly for short queries without locks like CDRs.
On 6/20/2017 8:42 AM, Tech Support wrote:> I appreciate all the feedback, and replication seems to be a logical solution, but I was initially thinking about how to implement a solution within Asterisk to write the CDR's to two databases. Is that possible? Now I'm just curious.Sorry, maybe it's been mentioned. An AGI at call termination to write to the other database?