[OpenAFS] DB servers seperate from fileservers
Jeffrey Hutzelman
jhutz@cmu.edu
Tue, 08 Aug 2006 16:09:11 -0400
On Tuesday, August 08, 2006 03:00:33 PM -0500 John Hascall
<john@iastate.edu> wrote:
>
>> On Tuesday, August 08, 2006 02:49:41 PM -0400 Derek Atkins
>> <warlord@MIT.EDU> wrote:
>> > Ken Hornstein <kenh@cmf.nrl.navy.mil> writes:
> ...
>> > I wonder if we could add a cache manager query so that apps could
>> > ask the cache manager for server stats? Obviously this would be
>> > an optional query, and the app should continue to use the current
>> > random choice if there is no cache manager. But I think it would
>> > help this case if there were some way to store this kind of state
>> > on a client.
>
>> You mean like VIOCCKSERV, which tells you which servers the cache
>> manager currently thinks are down? Or more like VIOCGETSPREFS, which
>> tells you what preference order the cache manager has assigned to
>> servers?
>
> Don't those deal with fileservers?
> And isn't the case at hand dealing with DB servers?
As it turns out, VIOCCKSERV does not report up/down state for database
servers (though it does probe them, if you asked for probing). However,
the cache manager does maintain preferences for both fileservers and
vlservers, and VIOCGETSPREFS can be used to retrieve either set.
> Seems to me that a far simplier method would be for stand-alone
> clients to start with a short timeout and circle through the
> DB servers quicker.
>
> To wit, something like this, in pseudo-code:
>
> for (i = 4; i <= 4096; i <<= 1) {
Ugh.
> for (j = 0; j < n_DBservers; ++j) {
> rc = connect_to_server_with_timeout_in_msecs(server[j], i);
> if (rc == SUCCESS) break;
> }
> }
> if (rc != SUCCESS) die_a_horrible_death();