yarp
A toolkit for developing high-performance HTTP reverse proxy applications.
A Microsoft open-source toolkit for building custom reverse proxy servers in .NET, you embed it in your own app and configure routing, load balancing, and request forwarding to your needs.
YARP (Yet Another Reverse Proxy) is a Microsoft project that gives .NET developers a toolkit for building their own reverse proxy servers. A reverse proxy sits in front of other servers and forwards incoming requests to the right destination, often handling tasks like load balancing, routing, and security in one place. Rather than a standalone off-the-shelf proxy, YARP is designed to be embedded into your own application and customized.
The main idea behind YARP is flexibility. Many internal Microsoft teams were building their own proxies from scratch, each with slightly different requirements. YARP was created to give them a shared foundation they could all extend rather than duplicate. The library exposes its internal pipeline as a set of modules you can replace or modify, so if the default routing logic does not fit your needs, you can swap it out without rebuilding the whole project from source.
YARP is built on top of ASP.NET, Microsoft's web framework for .NET. Configuration can be loaded from files or managed entirely in code via an API, which matters for teams that control routing rules through their own backend systems rather than static config files.
To get started, the project offers a NuGet package and a project template. Building from the source requires running a provided script that downloads the correct .NET version automatically. Tests can be run with a single build command. The project is open source under the .NET Foundation and welcomes contributions. Security issues should be reported privately to Microsoft's security team rather than as public issues.
Where it fits
- Build a custom API gateway in .NET that routes requests to different backend services based on rules you define in code.
- Add load balancing across multiple backend servers to your ASP.NET Core app without a third-party proxy tool.
- Replace hand-rolled proxy logic inside a .NET microservices system with a maintained, extensible shared library.