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. We call this service, the Eureka Server. Eureka also comes with a Java-based client component,the Eureka Client, which makes interactions with the service much easier. The client also has a built-in load balancer that does basic round-robin load balancing. At Netflix, a much more sophisticated load balancer wraps Eureka to provide weighted load balancing based on several factors like traffic, resource usage, error conditions etc to provide superior resiliency.
This project is a simple but functional example of Eureka Server using Spring Cloud with NO Authentication.
It's an eclipse project, just import it and run. If you want to run cluster please use Spring profiles primary and secondary.
- application.yml
- server.port : Server Port
- Configure application (application.yml above)
- Start Eureka Server [rigth-clic, run :) ]
- Browse to http://localhost:17001 (modify this URI according to configuration) In section "Instances currently registered with Eureka" you have to found MYAPP-EUREKA-SINGLE-SERVER server register You can start a cluster using Spring profiles primary and secondary, in that case you will found MYAPP-EUREKA-SERVER server register
- Start at least one instance of Customers Microservice and Vehicles Microservice
- Verify in http://localhost:17001 section "Instances currently registered with Eureka" CUSTOMERS-MICROSERVICE and VEHICLES-MICROSERVICE appears.
And you Done !!!!
- Please feel free to add/modify/correct/update any part of this content as necessary