Microsoft has announced the release of YARP 1.0, described by the software giant as a highly customisable reverse proxy built using the .NET framework. A key feature is that YARP is supplied as a library and includes samples showing how to create a proxy customised to the needs of a user’s specific scenarios.
Announced on Microsoft’s .NET Blog, YARP (Yet Another Reverse Proxy) is a toolkit for building reverse proxy servers in .NET using the infrastructure from ASP.NET and .NET. It is apparently the end result of an internal project to deliver an open source reverse proxy server, following requests from teams within the company who were either building a reverse proxy for their service or seeking technology for building one.
Because YARP is supplied as a library, users building a proxy server use a template that calls into YARP, which makes it easier to add features and customisations.
YARP plugs into ASP.NET as middleware for handling incoming requests, and offers two main paths for users to either take the tool and simply use it, or to customise it.
The first path is to use it as a full-featured proxy, configuring YARP to handle a defined set of routes based on URL patterns, which map to clusters of destination servers to handle requests for the routes the cluster is mapped to, as with other reverse proxies. Users can add additional modules to customise the configuration, or obtain route and destination information from a source such as Service Fabric, for example.
However, for highly customised environments, the YARP request forwarder can be called directly, bypassing the routing and load-balancing modules. According to Microsoft, this is how YARP is being used by Azure App Service for routing requests to specific instances, where the instances are spun up on demand.
YARP is hosted on GitHub, and documentation for the project is also available there.