We setup a system to handle this, but using mysql. We had a database table setup with a list of the READONLY dbs. When witango needed a DSN it would hit this code that would check the table, and cache the percentages for how often it should connect to each slave. It worked perfect, only taking extra time on the first hit. If we lost a db, the table was updated, less the bad server, or turning the percentage to 0. This function would also hit a function on each of 6 witango servers in a cluster, and EMPTY the DSN data, so on the next hit, it would have to recheck db.

We built a console that looks like this, you log into, and can administer remotely. Used to be 6 servers, we only have 2 with some legacy clients now. But the DB load system still works. Somewhere back in time, I posted much more detail on this process, and the pitfalls of db replication with witango.



-- 

Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040

On Apr 20, 2009, at 9:54 PM, Anthony Humphreys wrote:

Rob, Robert,
 
This is also on my own To Do List... Therefore I, too, am quite interested to hear how things work out for you on this.
 
The servers don't have to busy to see the effect that doing this has on performance; I've done this, and it's awful! It adds an extra 0.1 to 1.5 seconds for every page, usually about 1/4 to 1/2 second per page. It really makes the site become sluggish. Yuck!
 
Better to catch the specific error and to do a redirect (reload) when caught, Perhaps by using Tango's error.htx (or else in all of the DB actions -- best as an include file!)
 
Anthony -
 
 
On 4/21/09, Robert Shubert <[email protected]> wrote:
Rob,

I don't have any experience with what you are doing - but it's on my to-do
list so I am interested in hearing about your problem (and hopefully
solution)
...deleted... In my opinion, I would either let Witango throw its errors and close down
the useless connections, sure you'll give a handful of people a poor
experience, but it should ultimately work properly. Another idea would be to
restart the Witango service as part of the fail-over activation/deactivation
script. I'm not sure how sophisticated your fail-over mechanism is, but many
have scripting environments where you can easily stop and start NT services.

Hope that helps.

Robert
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to