EMA C++ Developers Guide : 6 Consuming Data from the Cloud : 6.6 Service Discovery
 
6.6 Service Discovery
After obtaining a token (for details, refer to Section 6.4.2), the Enterprise Message API can perform a service discovery against the Delivery Platform to obtain connection details for the Real-Time — Optimized. To discover endpoints, application may rely either on file or programmatic configuration. This is accomplished by making a REST query to the Service Discovery service. EMA API may be configured to perform this query and choose an endpoint (host and port) in a specified region. Or, EMA application may interact with a pre-defined service discovery object (see ServiceEndpointDiscovery) to customize choosing endpoint(s).
For service discovery performed by API, see Cons113 example. For service discovery performed in application, see Cons450 example.
In response to a service discovery, the Delivery Platform returns transport and data format protocols and a list of hosts and associated ports for the requested service(s) (i.e., an LSEG Real-Time Advanced Distribution Server running in the cloud or endpoint). LSEG provides multiple cloud locations based on region, which is significant in how the Enterprise Message API chooses the IP address and port to use when connecting to the cloud.
From the list sent by the Delivery Platform, the Enterprise Message API identifies a Real-Time — Optimized endpoint with built-in resiliency whose regional location matches the API’s location setting in ChannelGroup (for details, refer to Section 3.3.2 “Universal Channel Entry Parameters” of the Enterprise Message API C++ Edition Configuration Guide). If you do not specify a location, the Enterprise Message API defaults to the us-east-1 cloud location. An endpoint with built-in resiliency lists multiple locations in its location field (e.g., location: [us-east-1a, us-east-1b]). If multiple endpoints are configured for failover, the Enterprise Message API chooses to connect to the first endpoint listed.
Figure 4. Service Discovery