service discovery with eureka and spring cloud
TRANSCRIPT
Service Discovery with Eureka and Spring Cloud
Twitter: https://twitter.com/_marceloserpaGithub: https://github.com/marceloserpa
Agenda● Traditional vs Modern application● Communication between services● Service discovery● Service registry● Eureka and Spring Cloud● Many samples
Traditional applicationTo perform communication between services we need know the location of the service(port, host). In traditional applications it's a simple task because services run in a fixed and known location.
Modern applicationIn modern applications the services are running in a dynamic enviroment. A service can have N instances running in N different machines. In this case, to know host and port of each service is very painful.
The problem
Service discovery
Service registry
Eureka...“Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers.”
Eureka server with Spring Cloud configuration
Eureka server dashboard
Eureka client configuration
When you run the client application...
Show all instances registered
Consuming a service registered on Eureka
Load balancing request
Conclusion...
References● https://github.com/Netflix/eureka● http://microservices.io/patterns/client-side-discovery.html● https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/● http://salerno-rafael.blogspot.com.br/2016/08/spring-cloud-netflix-how-works-service.html● http://microservices.io/patterns/server-side-discovery.html● http://martinfowler.com/articles/microservices.html
Twitter: https://twitter.com/_marceloserpaGithub Samples: https://github.com/marceloserpa/marcelo_serpa_sandbox/tree/master/spring-cloud-eureka-poc