Building a Custom Endpoint Selector
The Discovery Service uses scopes to help determine which service or services can satisfy a request sent by a client application. A client application uses a scope ranker to order the service endpoints returned by the Discovery service according to the scope assigned to each service endpoint. For more information, see Building a Custom Scope Provider and Ranker. The client proxy uses an endpoint selector to retrieve an endpoint from this ordered list of service endpoints. The default endpoint selector provided with DCS picks the first endpoint from the list. However, you can build a custom endpoint selector that implements an alternative strategy. This is useful if a service has multiple service endpoints that expose different binding configurations. For example, if two or more service endpoints are available that have the same scope, then a custom endpoint selector can examine other attributes of these endpoints to determine which one most closely meets the requirements of the client application, such as selecting an endpoint that uses an MTOM encoding to transmit messages if the client application is expecting a response that contains binary large object (BLOB) data.
The topics in this section describe how to implement and configure a custom endpoint selector.