<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z" -->

---
title: YARP Reverse Proxy in ASP.NET Core | daily.dev
description: A hands-on walkthrough of YARP (Yet Another Reverse Proxy), Microsoft&#x27;s open-source reverse proxy built on .NET. Covers installing the Yarp.ReverseProxy NuGet...
canonical: https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: YARP Reverse Proxy in ASP.NET Core | daily.dev
og:description: A hands-on walkthrough of YARP (Yet Another Reverse Proxy), Microsoft&#x27;s open-source reverse proxy built on .NET. Covers installing the Yarp.ReverseProxy NuGet...
og:url: https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z
og:image: https://api.daily.dev/og/posts/JovauWD0Z.png
og:image:alt: YARP Reverse Proxy in ASP.NET Core
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# YARP Reverse Proxy in ASP.NET Core

**[NikolaTech](https://daily.dev/sources/nikolatech)** · 5 min read · 0 upvotes · 0 comments

## Summary

A hands-on walkthrough of YARP (Yet Another Reverse Proxy), Microsoft's open-source reverse proxy built on .NET. Covers installing the Yarp.ReverseProxy NuGet package, wiring it into Program.cs with AddReverseProxy, LoadFromConfig and MapReverseProxy, and configuring routes and clusters in appsettings.json to forward requests to a downstream API. Also demonstrates load balancing strategies (RoundRobin, LeastRequests, PowerOfTwoChoices, Random) and active/passive health check configuration for backend destinations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nikolatech.net/blogs/yarp-reverse-proxy-asp-dotnet-core>

## Questions this post answers

### How do I configure YARP to route requests to a backend API in ASP.NET Core?

Install the Yarp.ReverseProxy NuGet package, call AddReverseProxy().LoadFromConfig() in Program.cs, then map routes and clusters in appsettings.json. A route defines a Match.Path pattern like /yarp/products/{**catch-all} linked via ClusterId to a cluster, which lists Destinations with backend addresses such as https://localhost:7215.

_daily.dev surfaces practical ASP.NET Core patterns for developers wiring up service routing._

### What load balancing policies does YARP support for distributing requests across destinations?

YARP supports RoundRobin, which distributes requests sequentially; LeastRequests, which routes to the destination with the fewest active requests; PowerOfTwoChoices, which picks two random destinations and chooses the less busy one; and Random, which selects a destination at random. The policy is set via LoadBalancingPolicy on a cluster configuration.

_Comparing load balancing strategies matters when picking the right fit; daily.dev keeps that research in one place._

## Similar posts on daily.dev

- [YARP and Aspire: "https\+http scheme is not supported"](https://daily.dev/posts/yarp-and-aspire-https-http-scheme-is-not-supported--ao9iptakh) · The Art of Simplicity · 5 upvotes · 0 comments
- [Building a .NET API Gateway with ClickHouse and Aspire](https://daily.dev/posts/building-a-net-api-gateway-with-clickhouse-and-aspire-jjct03v7d) · ClickHouse · 0 upvotes · 0 comments
- [.NET Aspire: The price of forgetting WithReference](https://daily.dev/posts/net-aspire-the-price-of-forgetting-withreference-ivluyvzfp) · The Art of Simplicity · 14 upvotes · 1 comments

---

Tags: [#microservices](https://daily.dev/tags/microservices), [#aspnet](https://daily.dev/tags/aspnet)

[View this post on daily.dev](https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"YARP Reverse Proxy in ASP.NET Core","url":"https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z"},"datePublished":"2026-10-04T13:07:32.136Z","dateModified":"2026-10-04T13:17:43.063Z","description":"A hands-on walkthrough of YARP (Yet Another Reverse Proxy), Microsoft's open-source reverse proxy built on .NET. Covers installing the Yarp.ReverseProxy NuGet...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6f4cd3fbbc547db0c1a271db15ec547b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6f4cd3fbbc547db0c1a271db15ec547b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"NikolaTech","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NikolaTech","logo":"https://media.daily.dev/image/upload/s--1h2fO6FL--/f_auto,q_auto/v1791119050/logos/nikolatech?_a=BAMAMicg0","url":"https://daily.dev/sources/nikolatech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"microservices,aspnet","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NikolaTech","item":"https://daily.dev/sources/nikolatech"},{"@type":"ListItem","position":3,"name":"YARP Reverse Proxy in ASP.NET Core"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/yarp-reverse-proxy-in-asp-net-core-jovauwd0z#faq","mainEntity":[{"@type":"Question","name":"How do I configure YARP to route requests to a backend API in ASP.NET Core?","acceptedAnswer":{"@type":"Answer","text":"Install the Yarp.ReverseProxy NuGet package, call AddReverseProxy().LoadFromConfig() in Program.cs, then map routes and clusters in appsettings.json. A route defines a Match.Path pattern like /yarp/products/{**catch-all} linked via ClusterId to a cluster, which lists Destinations with backend addresses such as https://localhost:7215. daily.dev surfaces practical ASP.NET Core patterns for developers wiring up service routing."}},{"@type":"Question","name":"What load balancing policies does YARP support for distributing requests across destinations?","acceptedAnswer":{"@type":"Answer","text":"YARP supports RoundRobin, which distributes requests sequentially; LeastRequests, which routes to the destination with the fewest active requests; PowerOfTwoChoices, which picks two random destinations and chooses the less busy one; and Random, which selects a destination at random. The policy is set via LoadBalancingPolicy on a cluster configuration. Comparing load balancing strategies matters when picking the right fit; daily.dev keeps that research in one place."}}]}
```

