You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
The transform component can still be used with the forwarder is needed.
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
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.
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.
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
The text was updated successfully, but these errors were encountered: