Cloud Zone is brought to you in partnership with:

As VP of Technology Evangelism at WSO2, Chris Haddad raises awareness of Platform as a Service, Cloud Architecture, Service Oriented Architecture, API Management, and Enterprise Integration. Prior to joining WSO2, Haddad’s experience includes building software development teams, contributing to open source, crafting technology roadmaps, leading Gartner research teams, and delivering Software as a Service and Web applications. Chris is a DZone MVB and is not an employee of DZone and has posted 111 posts at DZone. You can read more from them at their website. View Full User Profile

Netflix Open Sources Cloud Service Registry and Cloud Load Balancer

11.29.2012
| 5276 views |
  • submit to reddit

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

  1. Only supports round-robin traffic balancing scheme
  2. Does not support sticky session affinity between service clients and cloud service provider nodes
  3. Not tenant-aware or partition-aware
  4. Does not enforce security policies
  5. Does not monitor back-end Cloud service usage
  6. Does not monitor back-end Cloud service performance
  7. 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:

Eureka Architecture

NetFlix 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.

Published at DZone with permission of Chris Haddad, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)