Netflix recently announced an open source cloud service registry and cloud load balancer project called Eureka. Eureka provides Netflix’s public cloud movie service with required PaaS framework components that every cloud-native environment requires.
The service registry component tracks dynamic run-time cloud instances as the PaaS controller spins instances up or tears them down. Client applications or PaaS framework components may access the REST-based Eureka discovery service and learn where to direct cloud service requests, proactively re-configure and optimize cloud service connections, or reactively re-establish service after component failure. Eureka includes a simple load balancer algorithm providing round-robin traffic balancing.
Netflix chose to build a simple, mid-tier load-balancing component that complements the Amazon Web Service (AWS) Elastic Load Balancer (ELB) service. Netflix recommends that teams use AWS ELB for exposing edge services to end-user web traffic and Eureka’s load-balancing service to perform mid-tier traffic routing inside the cloud domain.
When determining how Eureka’s simple load-balancer service fits within your private cloud PaaS, consider the following service limitations:
- Only supports round-robin traffic balancing scheme
- Does not support sticky session affinity between service clients and cloud service provider nodes
- Not tenant-aware or partition-aware
- Does not enforce security policies
- Does not monitor back-end cloud service usage
- Does not monitor back-end cloud service performance
- Does not proxy cloud service client traffic
When reviewing the code in GitHub, I found the minimal load-balancing services overshadowed by service registration, monitoring, and registry replication.
Applications services use the Eureka client code to register, renew, or cancel registry leases. Eureka registry server nodes replicate registry information across regions and improve resiliency. The registry server tracks underlying AWS infrastructure services (i.e., computer health, IP address changes), monitors availability, and services application client requests for cloud application service location.
The figure below illustrates the Eureka architecture:
Service registry entries are dynamically updated and automatically expire if the application instance lease is not renewed. The registry automatically replicates registry information across AWS regions and shares registry information based on user-defined query schemes. Because application clients use the Domain Naming Service (DNS) to identify Eureka server locations, Eureka server hosts should be fairly static and resilient. The Eureka Wiki describes how to configure the project locally or within AWS.
Eureka’s strengths are a deep understanding of the AWS architecture, robust instance monitoring, and performing dynamic registry updates.
By releasing Eureka code on GitHub under the Apache 2.0 License, Netflix provides a glimpse into PaaS framework components used to run one of the most reliable, resilient, and scalable public cloud services. If dynamic registry updates and run-time instance discovery are within your cloud project requirements, consider using Eureka in your Java PaaS framework.
As vice president of technology evangelism at WSO2, Chris Haddad raises visibility, awareness, and knowledge of platform as a service, service-oriented architecture, and API Management. Previously, Chris led Gartner’s IT1 team advising Fortune 500 enterprise organizations and technology infrastructure vendors.