Subject: Re: best server option

From: James Kempf <[email-masked]>
Date: Thu, 6 Jul 2000 08:38:55 -0700 (PDT)

Erik,

The problem is what a particular service means by "best". Suppose the best 
server is the one running the most number of something, or having the most
outgoing telephone lines, or something like that. It's too ambiguous.
How would you define it? Have some kind of rule based language
to define what best means in the SA? How would a UA determine what
various services' "best" are? I can see this leading to complications
for SLP querying which is, in my opinion, pretty straightforward at
the moment.

It's possible to achieve load balancing in a number of different 
ways that don't involve the difficulties you've outlined.
The most obvious is to simply search for the server based on static
attributes, and retrieve the dynamic attributes using AttrRqst, then
make a determination based on that in the UA. In your example, this would be:

	SrvRqst:
	
	service:compute-server
	(&(operating-system=solaris 8)(platform=x86))
	
	AttrRqst:
	
	(load-average)
	
This is my preferred way of doing it. The reason is that dynamic
attributes like load-average change at unknown, and perhaps
very small intervals, so it makes more sense to actually retrieve
the value and perform the computation on the client side, since
you will be getting a past value no matter how you perform the query.

Another possibility is to use the (about to be defunct) AttrRqst by
service type to determine what the range of load-balancing is:

	AttrRqst:
	
	service:compute-server
	(load-average)
	
The UA doesn't find out from this which servers have which load averages,
but it does give a range from which you can choose. The UA could also
include the operating-system and platform attributes to determine
if any servers support the operating system and platform, though,
of course, it won't get the correlation with the load-average,
but the UA will be saved making a SrvRqst if no servers support
the desired operating-system and platform. From this, the
UA can perform a SrvRqst, although, because the load-average is dynamic,
there is no guarantee that the average which came back in the
AttrRqst will hold at the time the query is processed (the UA can include a 
"fudge factor" to handle this problem) nor that it applies to
the service having the desired operating-system and platform attributes.

In short, I think there are already ways in SLP to perform load balancing,
though it can't be performed in a single SrvRqst. I would not want
to see this introduced into the base protocol.

That said, I don't want to discourage anyone who has an idea for an extension
to query for "best" server. If there is interest in some support for
allowing a single query to return the "best" server, then I could see
an experimental extension as the vehicle for implementing it. Naturally,
there would also have to be support for how "best" is defined, how
the UA finds out what a particular service's "best" is, etc.

		jak

---

From: Erik Guttman <[email-masked]>
Date: Thu, 6 Jul 2000 17:51:56 +0200 (MET DST)

> Erik,
> 
> The problem is what a particular service means by "best".

Suppose you just use a really naive approach - like the max or min of
an attribute?  This is *really useful* and easy to implement interoperably
if we allow only one attribute, and either MAXIMUM or MINIMUM as the mode.

That doesn't help you when your max function depends on two attributes -
like the proxy with the lightest load *and* the fastest processor, where 
load is twice as important as processor speed.  That is a pretty complex
function though and best handled, as you indicated, by getting all the
attributes and doin a client side computation.

Erik