Subject: best server option

From: Erik Guttman <[email-masked]>
Date: Thu, 6 Jul 2000 11:24:42 +0200 (MET DST)

James Kempf wrote:
> Re. "best server", I think this would be really hard to define and I 
> don't see much point in it. If the point is to limit the number of 
> replies, then that could be achieved in the API for multicast by 
> setting the maximum number of replies, and it could be achieved for 
> a DA by defining an SLP extension that told the DA to limit the 
> number of replies. 

The idea of a best server option is that it could supply an attribute 
name and a mode and ask for the best server on that basis.  For example:

   Service Request:
     Service Type :  service:compute-server
     Search Filter:  (&(operating-system=solaris 8)(platform=x86))
     
     Best Server Extension:
       Attribute    :  load-average
       Mode         :  MINIMUM

The DA would return the location of the compute server with the
lowest load average, which was on an x86 platform, running solaris 8.

Unless we use a 'best server option' it is really hard to find the
'best server' with SLP!

Say you want the best server.  You can send a request:

  (&(operating-system=solaris 8)(platform=x86)(load-average<=1.0))

There are three possibilities:

1  You find no servers

   The load average could be too low.  You have to reissue the request
   repeatedly with increasing values for 'load-average', till you get 
   result 2 or 3 below:

    (&(operating-system=solaris 8)(platform=x86)(load-average<=2.0))
    (&(operating-system=solaris 8)(platform=x86)(load-average<=3.0))
    (&(operating-system=solaris 8)(platform=x86)(load-average<=4.0))
     ...

2  You find one server

   You are done.  This is the 'best server.'

3  You find many servers

   You have to issue a request with a lower value for 'load-average'
   till you get only one server.

    (&(operating-system=solaris 8)(platform=x86)(load-average<=0.5))
    -> 10 results
    (&(operating-system=solaris 8)(platform=x86)(load-average<=0.25))
    -> 0 results

   At any point you may get result 1 (no results) - in which case you 
   have to increase the value - effectively this is a binary search:

    (&(operating-system=solaris 8)(platform=x86)(load-average<=0.375))
    -> 5 results
    (&(operating-system=solaris 8)(platform=x86)(load-average<=0.3125))
    -> 3 results
    (&(operating-system=solaris 8)(platform=x86)(load-average<=0.2825))
    -> 0 results
    (&(operating-system=solaris 8)(platform=x86)(load-average<=0.298125))
    -> 1 result

This is pretty gross!

Erik