From: Dan F. <da...@ha...> - 2007-02-03 01:26:19
|
Hey Paul. Thanks for the patch. Its pretty nice and clean :) Paul B. Henson wrote: > I'm setting up sqlgrey with a dual server multi-master mysql replication > configuration. I wanted it to be able to failover between the two database > servers, both of which are read/write. The write remotely, read locally > clustering didn't really seem like it would do what I wanted. > Well.. I must admit.. I actually patched the dbclustering DBIx component, so you never write to a read-host. It was what i needed when i made the dbclustering support. I added a variable to the module called something like READ_HOSTS_NEVER_WRITE (from my memory). 2 questions: 1: Would allowing you to set the READ_HOSTS_NEVER_WRITE = 0 from config do the same for you? So ALL hosts defined are read & write hosts and switched between in a round robin manner. 2: How scalable is your setup? We currently run 1 write-host and 7 read-hosts. Can multi-master be used in such a setup? (a little off topic i guess;) > The attached patch adds a new configuration directive, db_hostlist, which > takes a list of one or more database servers (presumably more than one, or > one could just use db_host). If we need to specify more than 1 "write" hosts, would there be any logic in simply allowing multiple hosts to be defined on "db_host" instead (comma separated)? Just so we dont need an extra config directive to do the job that an existing directive could do. > Also, the patch moves the logging of the database error to before the > call to db_unavailable(). For some reason, DBI::errstr lost its value > during the call to db_unavailable(), and with the logging message > afterwards, no error was printed. > Im hoping Lionel has the time to double-check this. I dont know much about that part of the code.:) - Dan |