📎 Webclip
Managing your Microservices on Heroku with Netflix's Eureka
The post explains that Netflix’s open source tools, especially Eureka, are aimed at microservices systems where many services need a way to find each other. Eureka acts as a service registry, keeping track of service metadata, health, availability, and registrations so clients can discover one another.
It then walks through deploying a Eureka server and a Eureka client on Heroku, setting config variables, and checking the dashboard and logs to confirm registration. It also shows how to add a peer profile so two Eureka server instances can replicate across regions, and notes that Spring Cloud also offers Hystrix, Ribbon, and Feign.
Reading notes#
- Netflix open sourced components such as Eureka for service discovery, Hystrix for service failure, and Ribbon for client-side load balancing.
- Spring Framework makes it easier to deploy Netflix OSS on Heroku while following Twelve Factor principles.
- Microservices split a large project into smaller, more manageable pieces.
- A Eureka server is a service registry where each microservice registers itself so consumers can find it.
- Eureka keeps service health, availability, and other metadata.
- The server demo is deployed on Heroku with Git deployment, a config variable for the user password, and a browser login.
- A Eureka client registers itself with the server, sends heartbeat messages, and is removed if heartbeats stop within the configured timetable.
- The client demo uses
EUREKA_URLandDOMAIN_NAMEconfig variables before deployment. - The logs show the client registering successfully, and the dashboard then lists the service instance.
- Non-Spring clients can also use Netflix’s Eureka Client directly, with Scala examples mentioned in Atlas and IEP.
- Eureka keeps the registry in memory and clients also cache registrations in memory.
- Replication is configured with a new Spring profile called
peerand aProcfilechange. - Two Heroku apps are created in different regions and pointed at each other with
EUREKA_PEER_URL. - Spring Cloud also provides Hystrix Clients, Hystrix Dashboard, Ribbon, and Feign for a broader microservices stack.
