Looking over the list archives and Wiki there doesn't seem to be any sort of built-in host redundancy with the proxy. I would prefer to use a built in though it doesn't look like this is possible.

One of the suggestions that I found in the list archives was to write a script which checks the health of the hosts and adjusts the MySQL table accordingly. Has anyone done anything like this in production?


Thanks,

Cory



Here is a sample of what I'm testing the proxy with.

CREATE TABLE `users` (
  `user` varchar(255) NOT NULL,
  `filesystem` varchar(5) NOT NULL,
  PRIMARY KEY  (`user`),
  UNIQUE KEY `idx_user` (`user`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

CREATE TABLE `hostmap` (
  `id` int(11) NOT NULL auto_increment,
  `filesystem` varchar(5) NOT NULL COMMENT 'Filesystem identifier',
  `ip` int(10) unsigned NOT NULL,
  `alive` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `idx_hostmap` (`filesystem`,`ip`)
) ENGINE=MyISAM AUTO_INCREMENT=103 DEFAULT CHARSET=latin1

password_query = SELECT user,NULL as password, INET_NTOA(hostmap.ip) as host, 'Y' AS proxy_maybe from users left join hostmap on users.filesystem=hostmap.filesystem where hostmap.alive=1 and users.user='%u' limit 1;

Reply via email to