August 2018
Intermediate to advanced
372 pages
9h 29m
English
Previously, we mentioned that a load balancer used to be used to offer high scalability by using more than one server as a backend. Eureka works in the same way, but the main benefit is that you won't need to add any configuration in the service registry when more instances of a server are provisioned. Instead, every instance should let Eureka know that it wants to be registered.
Registering a new service is quite simple. You just need to include the following dependency:
compile ('org.springframework.cloud:spring-cloud-starter-netflix-eureka-client')
The service application class should include an additional annotation that will be discovered, as follows:
@EnableDiscoveryClient@SpringBootApplication ...
Read now
Unlock full access