Over a million developers have joined DZone.

Netflix Open Sources Cloud Service Registry and Cloud Load Balancer

DZone's Guide to

Netflix Open Sources Cloud Service Registry and Cloud Load Balancer

· Big Data Zone ·
Free Resource

Hortonworks Sandbox for HDP and HDF is your chance to get started on learning, developing, testing and trying out new features. Each download comes preconfigured with interactive tutorials, sample data and developments from the Apache community.

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.

Hortonworks Community Connection (HCC) is an online collaboration destination for developers, DevOps, customers and partners to get answers to questions, collaborate on technical articles and share code examples from GitHub.  Join the discussion.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}