Netflix has released Prana, an open-source "sidecar" application the company developed to allow heterogeneous microservice applications to use the NetflixOSS JVM-based platform support libraries.
Prana is deployed onto each service instance and is conceptually attached to the “parent” service in the same manner a motorcycle sidecar is attached to the motorcycle. It runs alongside a service as a second process and provides platform infrastructure features exposed over an HTTP API, such as service discovery, dynamic configuration and resilient inter-service communication.
The Netflix blog states that the use of a sidecar application has gained popularity inside and outside of Netflix, particularly when operating and managing a heavily microservice-based ecosystem. A sidecar application such as Prana can offer a homogeneous interface to platform infrastructure for services that are increasingly heterogeneous in terms of implementation and deployment technologies.
Communicating to Prana cross-process over HTTP enables applications written in other languages such as Python and Node.js or services like Memcached, Spark and Hadoop to utilise features provided by a NetflixOSS library without the library being re-written for the target language or platform.
Prana provides the following features to a parent service to which a sidecar application has been attached:
- Service registration and discovery via the Eureka service. This makes the parent service “discoverable” by additional NetflixOSS-based components, and also provides a health check HTTP endpoint.
- Dynamic configuration, provided by Archaius. This allows the parent service to receive updates to dynamic properties.
- Resilient inter-service communication. The Prana sidecar proxies requests to other microservices using Hystrix/Ribbon, which allows the parent service to invoke other services utilising the circuit breaker, bulk heading and fallback functionality provided by these libraries.
- Runtime insight and diagnostics of the service instance and corresponding environment via an embedded Admin Console.
Prana has also been designed to allow additional custom plugins to be added for extensibility, although the implementation of this feature is currently listed as an open issue on the project’s Github page. The core Prana application is built upon Karyon, Netflix’s microservice template, and RxNetty, Netflix’s Reactive Extension (Rx) Adaptor for the Netty asynchronous event-driven network application framework.
Architectural Diagram of Prana via Netflix Blog
The use of sidecar applications, also referred to as “ambassador” applications, outside of Netflix includes Andrew Spyker’s Acme Air NetflixOSS-based demonstrator application for dynamic configuration, Docker for cross-container linking, and AirBnB’s SmartStack application suite for service discovery.
The Prana sidecar application can be integrated into services by following the instructions contained within the project’s Github “Getting Started” page.