#### Interchangeable Server Instances

With the service model, servers offer an identical service that operates the same way on all host systems. For example, an application that uses the service model is a collection of equivalent print servers that support an identical set of file formats, and that are installed on printers in a single location. The print servers in any location can be segregated from printer servers elsewhere by using a location-specific group. The following figure shows interchangeable print servers offering an identical print service on different hosts. To access this service, clients request the Print V1.0 interface and specify the nil object UUID. In this illustration, the starting entry for the NSI search is a group corresponding to local print servers. Note that a client may be able to reach this print server group by starting from a profile or another group.

Note: To simplify the illustrations of the usage models, the contents of server entries are represented without listing any binding information.

Service Model: Interchangeable Instances on Two Hosts

Note: The number of entries traversed by a search operation is unrelated to the number of binding handles it returns.

The following figure shows interchangeable service instances offering an identical statistics service on a single host. To access this service, clients request the Statistics V1.0 interface and specify the nil object UUID. The starting entry for the NSI search is a group corresponding to local servers that offer the service (or a profile that refers to that group).

Service Model: Interchangeable Instances on One Host

Note that, if an application with interchangeable server instances uses the connectionless RPC protocol, the default behavior of the endpoint map service is to always return the endpoint from the first map element for that set of server instances. To avoid having all clients using only one of the instances, before making a remote procedure call to the server, each client must inquire for an endpoint. For a random selection, a client calls the rpc_ep_resolve_binding( ) routine. Alternatively, a client can call the rpc_mgmt_ep_elt_inq_...( ) routines to obtain all the map elements for compatible server instances, and then use an application-specific selection algorithm to select one of the returned elements.

####