OverviewAs explained in previous blog posts, Netflix employs a fine grained Service Oriented Architecture. We also believe in and strive towards employing a homogenous architecture. This has the benefit of code and component reuse as well as operational efficiency gained via common understanding and usage patterns.
Given that we have several teams at Netflix that have hundreds of web services built and deployed, how do we ensure a homogenous architecture and share common patterns?
Meet Karyon, the nucleus of our Cloud Platform stack.
Karyon, in the context of molecular biology is essentially "a part of the cell containing DNA and RNA and responsible for growth and reproduction."
At Netflix, Karyon is a framework and library that essentially contains the blueprint of what it means to implement a cloud ready web service. All the other fine grained web services and applications that form our SOA graph can essentially be thought as being cloned from this basic blueprint.
Today, we would like to announce the general availability of Karyon as part of our rapidly growing NetflixOSS stack. Thus far we have open sourced many components that form the Netflix Cloud Platform, and with the release of Karyon, you now have a way to glue them all together.
Karyon has the following main ingredients.
- Bootstrapping, Libraries and Lifecycle Management (via Governator)
- Runtime Insights and Diagnostics (via built in Admin Console)
- Pluggable Web Resources (via JSR-311 and Jersey)
- Cloud-Ready hooks (Service Registration and Discovery, HealthCheck hooks etc.)
Bootstrapping, Libraries and Lifecycle ManagementA typical web service needs to load configurations and initialize itself and all its dependencies. Karyon makes this easy with its Component driven architecture.
In Karyon, the Application represents a standalone application or main class of a Web Service. Each Application may consist of many Components.
You can read more about Governator at our Github location.
Admin Console (Runtime Insights and Diagnostics)Karyon contains a pluggable Admin Console component that provides a visual interface for observing and managing other components.
The current open sourced version contains only a first-cut stand-in console. We will soon replace this with the more feature rich Console that we use inhouse.
For example, the Admin Console provides a visual interface for the following components.
- Libraries (i.e. all the libraries loaded, their versions and other meta data)
- Properties Management (i.e Properties inspection and Runtime editing via Archaius)
- JMX Console
- and more ... (Servo metrics, Ribbon Clients and Stats, Services discovered via Eureka etc.)
The JMX console shows the list of Beans and its attributes. It is relatively easy to expose your application's operational metrics and data to this console especially when used via Servo.
The screenshot above shows the Properties Console. Karyon offers Archaius as its default Properties Management Component. Note: The more advanced Admin Console shown in the screenshot above will be released in the coming weeks.
Pluggable Web ResourcesJSR-311 allows for a very flexible and pluggable Web Resource container. Karyon essentially utilizes and extends this via Ribbon.
Cloud ReadyKaryon makes it easy to integrate with Service Discovery components such as Netflix's Eureka along with several of the components mentioned below that aid in building a resilient and scalable web service. Karyon forms the nucleus that holds all these together.
Upcoming featuresOn top of bootstrapping and the features mentioned above, at Netflix, Karyon also provides a flexible runtime semantics, notably:
- Request context propagation across services. (when used with Ribbon.)
- Enforcing/reporting SLAs.
- Request tracing.
- Request throttling.
Getting StartedThe best way to get started with Karyon and building Web Services is to clone the "HelloWorld" sample web service available at github. The Getting Started page offers more details.
ConclusionKaryon aims to provide the basic ingredients that form the nucleus of most web services and applications. While Karyon provides the main ingredients for a cloud ready web service, it does not out-of-the-box showcase many of the other components that form the Platform Stack.
A typical web service at Netflix uses many of the building blocks and design patterns in the Netflix Cloud Platform stack. For example:
- Runtime Configuration of Properties via Archaius
- Inter Process Communication and Resilient Load Balancing via Ribbon
- Latency and Fault tolerance via Hystrix
- Functional Reactive Programming via RxJava.
If you would like to contribute to our highly scalable libraries and frameworks for ephemeral distributed environments, please take a look at http://netflix.github.com. You can follow us on twitter at @NetflixOSS.
We will be hosting a NetflixOSS Open House on the 13th of March, 2013 (Limited seats. Please RSVP.) during which we will showcase Karyon and other OSS projects.
We are constantly looking for great talent to join us and we welcome you to take a look at our Jobs page or contact @stonse for positions in the Cloud Platform Infrastructure team.