Skip to content

Commit 8d0a4b0

Browse files
committed
Add overview of extensibility part 1
1 parent 382a850 commit 8d0a4b0

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

aspnetcore/fundamentals/servers/yarp/extensibility.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,27 @@ content_well_notification: AI-contribution
1010
ai-usage: ai-assisted
1111
---
1212

13-
# Overview of extensibility
13+
# Overview of YARP extensibility
14+
15+
* Middleware Pipeline
16+
* Http Forwarder
17+
18+
## Middleware pipeline
19+
20+
YARP uses the concept of [Routes](config-files.md#routes), [Clusters](config-files.md#clusters) and Destinations. These can be supplied through [configuration files](config-files.md) or [directly through code](config-providers.md). 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.
21+
22+
![Image](https://github.com/user-attachments/assets/ff17a04f-0c3c-46c7-8ec2-a1ed3dbc948c)
23+
24+
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.
25+
26+
See [Middleware](middleware.md) for more information.
27+
28+
29+
## Http Forwarder
30+
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.
31+
32+
![Image](https://github.com/user-attachments/assets/1a060a7e-fa43-49a4-bfad-f95d7d35be63)
33+
34+
The transform component can still be used with the forwarder is needed.
35+
36+
See [Direct forwarding](xref:fundamentals/servers/yarp/direct-forwarding) for more information.

0 commit comments

Comments
 (0)