Finagle is an open-source, asynchronous, protocol-agnostic RPC framework that was developed at Twitter. It provides a simple, yet powerful toolkit for building scalable, high-performance network services. Finagle has been used extensively at Twitter, powering services such as Twitter Search, Finatra, and Twitter Ads.
In this blog, we will introduce you to Finagle and explain some of its key features.
What is Finagle?
Finagle is a library for building asynchronous network services in Scala or Java. It provides a set of abstractions for building RPC clients and servers, including support for load balancing, service discovery, and failover. Finagle also provides a set of standard protocols, such as HTTP, Thrift, and Memcached, as well as the ability to add custom protocols.
Finagle is built on top of Netty, a high-performance network application framework. Netty provides an event-driven architecture that allows Finagle to handle large numbers of connections and requests concurrently, while keeping resource usage low.
Finagle is designed to be extensible and composable. It provides a set of building blocks that can be combined to create custom RPC services, allowing developers to focus on building business logic rather than worrying about low-level networking details.

Features of Finagle
Protocol-agnostic
Finagle is protocol-agnostic, meaning that it can support any protocol that can be implemented using asynchronous messaging. Finagle includes support for standard protocols like HTTP, Thrift, and Memcached, but it can also be used to implement custom protocols.
Asynchronous and non-blocking
Finagle is built on top of Netty, which provides an event-driven architecture that allows Finagle to handle large numbers of connections and requests concurrently, while keeping resource usage low. This makes Finagle ideal for building high-performance, scalable network services.
Load balancing
Finagle includes built-in support for load balancing, allowing clients to distribute requests across multiple servers. Finagle supports several load balancing algorithms, including round-robin, least connections, and consistent hashing.
Service discovery
Finagle includes built-in support for service discovery, allowing clients to dynamically discover and connect to available servers. Finagle supports several service discovery mechanisms, including ZooKeeper and Consul.
Fault tolerance
Finagle includes built-in support for fault tolerance, allowing clients to handle failures and recover from errors. Finagle supports several fault tolerance mechanisms, including retries, time-outs, and circuit breakers.
Extensible and composable
Finagle is designed to be extensible and composable. It provides a set of building blocks that can be combined to create custom RPC services, allowing developers to focus on building business logic rather than worrying about low-level networking details.
Conclusion
Finagle is a powerful, protocol-agnostic RPC framework that provides a set of abstractions for building scalable, high-performance network services. It includes support for load balancing, service discovery, fault tolerance, and more. Finagle is designed to be extensible and composable, allowing developers to focus on building business logic rather than worrying about low-level networking details. If you’re building a network service, Finagle is definitely worth considering.
References:
Twitter Finagle Documentation : https://twitter.github.io/finagle/
For a more technical blog, you can refer to the Knoldus blog: https://blog.knoldus.com/