Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARP Extensibility overview #34690

Open
samsp-msft opened this issue Feb 10, 2025 · 0 comments
Open

YARP Extensibility overview #34690

samsp-msft opened this issue Feb 10, 2025 · 0 comments
Assignees
Labels
seQUESTered Identifies that an issue has been imported into Quest.

Comments

@samsp-msft
Copy link
Member

samsp-msft commented Feb 10, 2025

In reviewing the content we want for a marketing site for YARP, I realized with @adityamandaleeka that content I wanted in the site should probably be in the docs instead. The topic is a high level overview of extensibility options in YARP, and should be the top topic under extensibility, something along the lines of:


YARP Extensibility

There are 2 main styles of extensibility for YARP, depending on the routing behavior that you want.

  • Middleware Pipeline
  • Http Forwarder

Middleware pipeline

YARP uses the concept of Routes, Clusters and Destinations. These can be supplied through configuration files or directly through code. Based on the routing rules, YARP picks a cluster and enumerates the possible destinations. It then uses the middleware pipeline to select the destination based on destination health, session affinity, load balancing etc.

Image

Most of the pre-built pipeline modules can be customized through code. You can also change the pipeline definition to replace modules with your own implementation(s) or add additional modules as needed.

See Middleware for more information.

Http Forwarder

If the YARP pipeline is too rigid for your needs, or the scale of routing rules and destinations is not suitable for loading into memory, then you can implement your own routing logic and use the HTTP Forwarder to direct requests to your chosen destination. The HttpForwarder component takes the HTTP context and forwards the request to the supplied destination.

Image

The transform component can still be used with the forwarder is needed.

See Direct forwarding for more information.

What would be cool is if the diagrams could be made into links for the respective sections for more information on each component?


Page URL: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/yarp/extensibility?view=aspnetcore-9.0
Content source URL:
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/servers/yarp/extensibility.md

Document ID: a90fd9cd-e22e-e600-e669-5a0d8be25878


Associated WorkItem - 372045

@Rick-Anderson Rick-Anderson added reQUEST Triggers an issue to be imported into Quest and removed ⌚ Not Triaged labels Feb 11, 2025
@Rick-Anderson Rick-Anderson moved this from 🔖 Ready to 🏗 In progress in dotnet/AspNetCore.Docs February 2025 sprint Feb 11, 2025
@dotnetrepoman dotnetrepoman bot added the mapQuest clean move label Feb 11, 2025
@dotnet-policy-service dotnet-policy-service bot removed the mapQuest clean move label Feb 11, 2025
@sequestor sequestor bot added seQUESTered Identifies that an issue has been imported into Quest. and removed reQUEST Triggers an issue to be imported into Quest labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants