I have MySQL Cluster set up for OpenSIPS which allows for the best Redundant High-Availability. I was wondering if it's possible for Asterisk to also use multiple database servers for Realtime? Currently with Realtime I am only able to point to a single IP address for a database. If that database server goes down that Asterisk is pointed to then Asterisk won't be able to do anything. Any options within Asterisk 1.8 to make it more fault tolerant when it comes to Realtime and databases? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101130/091f454c/attachment.htm
The only thing I found workable, is to use a hostname (i.e. asterisk_sql) and update /etc/hosts according to which SQL server is up or down. It's a bit of a hassle, and it would be easier if Asterisk supported fallback SQL servers, but once done it works well. Mike From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Duane Larson Sent: Tuesday, November 30, 2010 7:34 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Asterisk with MySQL Cluster I have MySQL Cluster set up for OpenSIPS which allows for the best Redundant High-Availability. I was wondering if it's possible for Asterisk to also use multiple database servers for Realtime? Currently with Realtime I am only able to point to a single IP address for a database. If that database server goes down that Asterisk is pointed to then Asterisk won't be able to do anything. Any options within Asterisk 1.8 to make it more fault tolerant when it comes to Realtime and databases? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101130/56c46d2e/attachment.htm
On Tue, Nov 30, 2010 at 7:34 PM, Duane Larson <duane.larson at gmail.com> wrote:> I have MySQL Cluster set up for OpenSIPS which allows for the best Redundant > High-Availability.? I was wondering if it's possible for Asterisk to also > use multiple database servers for Realtime?? Currently with Realtime I am > only able to point to a single IP address for a database.? If that database > server goes down that Asterisk is pointed to then Asterisk won't be able to > do anything.? Any options within Asterisk 1.8 to make it more fault tolerant > when it comes to Realtime and databases?http://dev.mysql.com/doc/refman/5.0/en/ha-overview.html It's a fair amount of work for what in my opinion is a minimal reward. If you've hardened everything else and this is the only single point of failure left in your entire infrastructure, you should be able to sleep well at night.
Thats sounds interesting too. I will look into that also. On Wed, Dec 1, 2010 at 1:30 AM, Stefan Schmidt <sst at sil.at> wrote:> Am 01.12.10 05:10, schrieb Duane Larson: > > For me OpenSIPS will do most of the work. Asterisk will only handle Hunt > > Groups/Queues, IVRs, and Voicemail when OpenSIPS forwards that traffic to > > Asterisk. And since I already have MySQL Cluster working in a redundant > > fashion I am not sure I want to try out MMM MySQL. I do like the idea of > > using DNS with hosts file and monitoring the MySQL service on the remote > > machine and if the service goes down then rewrite the IP in the hosts > file. > > I will have to test that out. > > > > If anyone else has any experience I would love to add that to this > thread. > > > > On Tue, Nov 30, 2010 at 7:04 PM, Singer X.J. Wang <wang at pythian.com> > wrote: > > > You could also try using a Mysql Proxy on your local machine. The proxy > should handle the connection to the servers and you have just a service > on your machine. If this service is unreachable you will loose again, > but the chance is even smaller and you have automagic fallbacks. > > http://dev.mysql.com/downloads/mysql-proxy/ > > best regards > > Stefan > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- -- *--*--*--*--*--* Duane *--*--*--*--*--* -- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101201/257f34a5/attachment.htm
On Tuesday 30 November 2010 18:34:17 Duane Larson wrote:> I have MySQL Cluster set up for OpenSIPS which allows for the best > Redundant High-Availability. I was wondering if it's possible for > Asterisk to also use multiple database servers for Realtime? Currently > with Realtime I am only able to point to a single IP address for a > database. If that database server goes down that Asterisk is pointed > to then Asterisk won't be able to do anything. Any options within > Asterisk 1.8 to make it more fault tolerant when it comes to Realtime > and databases?Yes, if you refer to configs/extconfig.conf.sample, within the Asterisk 1.8 tree, you'll see that realtime supports multiple lines per realtime family, scored by consecutive priorities. 1 is the default, but you can have as many as you'd like. Additionally, for res_config_odbc, there is a setting in res_odbc.conf called "negative_connection_cache", which is the length of time that Asterisk remembers that a connection is down before it will once again attempt to connect. The intention, of course, is that once the primary comes back up, you'll want the Asterisk server to revert back to using it. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org