What is Discovery API microservice and How to configure it?

In Server VRT,

  1. What do we mean by Discovery API?
  2. How can we configure discovery api at server level?
  3. What are the necessary properties which must be provided to make it operational?

Discovery API is a service that is used to store the address of services like dbes, igw, security, DMS, and sync engine. when the end user requests some resource through the app response will be returned by discovery to api gateway.

we can configure it in vahana from the environment and then click on VRT Then we have to put VRT IP which is the IP of api gateway which will internally call discovery API. As discovery API is not exposed directly to the end user.


Here question is confusing, There is nothing like Discovery API microservice.

If you are talking about, Service Discovery or Service Registry is one of the microservice design pattern.

In Spring Cloud family Netflix Eureka service registry is called as Discovery Server or Service Discovery or Service Registry.

What is Service Discovery?

A service registry enables client-side load-balancing and decouples service providers from consumers without the need for DNS. It is a dedicated server that is responsible to maintain the registry of all the Microservice that has been deployed and removed.

How we can configure Service Discovery?
We can download spring boot project from here as below:

Add @EnableEurekaServer in mail class

public class ServiceRegistrationAndDiscoveryServiceApplication {

	public static void main(String[] args) {
		SpringApplication.run(ServiceRegistrationAndDiscoveryServiceApplication.class, args);

Necessary properties which must be provided to make it operational

  port: ${PORT:8761} # Indicate the default PORT where this service will be started
    registerWithEureka: false #telling the server not to register himself in the service registry
    fetchRegistry: false
    waitTimeInMsWhenSyncEmpty: 0  #wait time for subsequent sync

Now we use consul service discovery in latest versions.

1 Like

Is there any specific reason or benefit to using Consul instead of Eureka Discovery?