Re: Replication and failover

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 10, 2007 at 12:14:44PM -0400, Nik Conwell wrote:
> Do you have separate IP addresses for each instance of cyrus on the  
> machine as well, or just the machine itself?  If just the machine,  
> what 'names' does the front-end know the back-end instances by?

Every store has an IP address for master (a.b.10.$storenumber) and
one for the replica (a.b.11.$storenumber) which maps to hosts files
entries (yay templating), so you can just refer to store6m.internal
to connect to the master IP address for store6.  Slots themselves
don't have any IP addresses.  Machines have their own base IP address,
and you can find them by, for example.

my $store = ME::ImapStore->new($storename);
# note, does DB lookup (cached for 5 seconds)
my $slot = $store->MasterSlot();
my $server = $slot->Machine();
my $ip = $server->InternalAddress();

and if you don't have perl you can always invoke it or write a small
Template::Toolkit script to spit out what you want.

Bron.
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux