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 compliments theAmazon Web Service (AWS) Elastic Load Balancer (ELB) service. Netflix recommends teams use AWS ELB for exposing edge services to end-user web traffic, and use 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. compute health, IP address changes), monitors availability, and services application client requests for cloud application service location. Figure 1 illustrates the Eureka architecture:
Figure 1: 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. TheEureka 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 projects requirement, consider using Eureka in your Java PaaS framework.