Skip to content

Commit af6d674

Browse files
Updated incorrect list bullets in YARP node
1 parent 48463b2 commit af6d674

15 files changed

Lines changed: 89 additions & 89 deletions

aspnetcore/fundamentals/servers/yarp/config-files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ Example:
9090
### Routes
9191

9292
The routes section is an unordered collection of route matches and their associated configuration. A route requires at least the following fields:
93-
- RouteId - a unique name
94-
- ClusterId - refers to the name of an entry in the clusters section.
95-
- Match - contains either a Hosts array or a Path pattern string. Path is an ASP.NET Core route template that can be defined as [explained here](/aspnet/core/fundamentals/routing#route-templates).
93+
* RouteId - a unique name
94+
* ClusterId - refers to the name of an entry in the clusters section.
95+
* Match - contains either a Hosts array or a Path pattern string. Path is an ASP.NET Core route template that can be defined as [explained here](/aspnet/core/fundamentals/routing#route-templates).
9696
Route matching is based on the most specific routes having highest precedence as described [here](/aspnet/core/fundamentals/routing#url-matching). Explicit ordering can be achieved using the `order` field, with lower values taking higher priority.
9797

9898
[Headers](xref:fundamentals/servers/yarp/header-routing), [Authorization](xref:fundamentals/servers/yarp/authn-authz), [CORS](xref:fundamentals/servers/yarp/cors), and other route based policies can be configured on each route entry. For additional fields see [RouteConfig](xref:Yarp.ReverseProxy.Configuration.RouteConfig).

aspnetcore/fundamentals/servers/yarp/config-filters.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ ai-usage: ai-assisted
1616
YARP configuration for routes, clusters, and destinations can be loaded from [configuration files](xref:fundamentals/servers/yarp/config-files) or from [configuration providers](xref:fundamentals/servers/yarp/config-providers). Configuration filters can be used to modify that raw input before it's validated and applied.
1717

1818
Filters can be used for a variety of purposes such as:
19-
- Supplementing config fields with data from other sources like the deployment environment
20-
- Applying system defaults
21-
- Applying common settings and enforce policies
22-
- Substituting placeholder values
23-
- Normalization and error correction
19+
* Supplementing config fields with data from other sources like the deployment environment
20+
* Applying system defaults
21+
* Applying common settings and enforce policies
22+
* Substituting placeholder values
23+
* Normalization and error correction
2424

2525
## AddConfigFilter
2626
Configuration filters are registered in the Dependency Injection system using the [AddConfigFilter](xref:Microsoft.Extensions.DependencyInjection.ReverseProxyServiceCollectionExtensions) API. Any number of unique filters can be added and will be applied in the order added.

aspnetcore/fundamentals/servers/yarp/config-providers.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Configuration can be modified during the load sequence using [Configuration Filt
2424

2525
### Routes
2626
The routes section is an unordered collection of named routes. A route contains matches and their associated configuration. A route requires at least the following fields:
27-
- RouteId - a unique name
28-
- ClusterId - refers to the name of an entry in the clusters section.
29-
- Match - contains either a Hosts array or a Path pattern string. Path is an ASP.NET Core route template that can be defined as [explained here](/aspnet/core/fundamentals/routing#route-templates).
27+
* RouteId - a unique name
28+
* ClusterId - refers to the name of an entry in the clusters section.
29+
* Match - contains either a Hosts array or a Path pattern string. Path is an ASP.NET Core route template that can be defined as [explained here](/aspnet/core/fundamentals/routing#route-templates).
3030

3131
[Headers](xref:fundamentals/servers/yarp/header-routing), [Authorization](xref:fundamentals/servers/yarp/authn-authz), [CORS](xref:fundamentals/servers/yarp/cors), and other route based policies can be configured on each route entry. For additional fields see [RouteConfig](xref:Yarp.ReverseProxy.Configuration.RouteConfig).
3232

@@ -55,9 +55,9 @@ httpContext.RequestServices.GetRequiredService<InMemoryConfigProvider>().Update(
5555

5656
### Startup
5757
The `IProxyConfigProvider` should be registered in the DI container as a singleton. At startup, the proxy will resolve this instance and call `GetConfig()`. On this first call the provider may choose to:
58-
- Throw an exception if the provider cannot produce a valid proxy configuration for any reason. This will prevent the application from starting.
59-
- Synchronously block while it loads the configuration. This will block the application from starting until valid route data is available.
60-
- Or, it may choose to return an empty `IProxyConfig` instance while it loads the configuration in the background. The provider will need to trigger the `IChangeToken` when the configuration is available.
58+
* Throw an exception if the provider cannot produce a valid proxy configuration for any reason. This will prevent the application from starting.
59+
* Synchronously block while it loads the configuration. This will block the application from starting until valid route data is available.
60+
* Or, it may choose to return an empty `IProxyConfig` instance while it loads the configuration in the background. The provider will need to trigger the `IChangeToken` when the configuration is available.
6161

6262
The proxy will validate the given configuration and if it's invalid, an exception will be thrown that prevents the application from starting. The provider can avoid this by using the [IConfigValidator](xref:Yarp.ReverseProxy.Configuration.IConfigValidator) to pre-validate routes and clusters and take whatever action it deems appropriate such as excluding invalid entries.
6363

@@ -68,15 +68,15 @@ The configuration objects and collections supplied to the proxy should be read-o
6868
If the `IChangeToken` supports `ActiveChangeCallbacks`, once the proxy has processed the initial set of configurations it will register a callback with this token. If the provider does not support callbacks then `HasChanged` will be polled every 5 minutes.
6969

7070
When the provider wants to provide a new configuration to the proxy it should:
71-
- Load that configuration in the background.
71+
* Load that configuration in the background.
7272
- Route and cluster objects are immutable, so new instances have to be created for any new data.
7373
- Objects for unchanged routes and clusters can be re-used, or new instances can be created - changes will be detected by diffing them.
74-
- Optionally validate the configuration using the [IConfigValidator](xref:Yarp.ReverseProxy.Configuration.IConfigValidator), and only then signal the `IChangeToken` from the prior `IProxyConfig` instance that new data is available. The proxy will call `GetConfig()` again to retrieve the new data.
74+
* Optionally validate the configuration using the [IConfigValidator](xref:Yarp.ReverseProxy.Configuration.IConfigValidator), and only then signal the `IChangeToken` from the prior `IProxyConfig` instance that new data is available. The proxy will call `GetConfig()` again to retrieve the new data.
7575

7676
There are important differences when reloading configuration vs the first configuration load.
77-
- The new configuration will be diffed against the current one and only modified routes or clusters will be updated. The update will be applied atomically and will only affect new requests, not requests currently in progress.
78-
- Any errors in the reload process will be logged and suppressed. The application will continue using the last known good configuration.
79-
- If `GetConfig()` throws the proxy will be unable to listen for future changes because `IChangeToken`s are single-use.
77+
* The new configuration will be diffed against the current one and only modified routes or clusters will be updated. The update will be applied atomically and will only affect new requests, not requests currently in progress.
78+
* Any errors in the reload process will be logged and suppressed. The application will continue using the last known good configuration.
79+
* If `GetConfig()` throws the proxy will be unable to listen for future changes because `IChangeToken`s are single-use.
8080

8181
Once the new configuration has been validated and applied, the proxy will register a callback with the new `IChangeToken`. Note if there are multiple reloads signaled in close succession, the proxy may skip some and load the next available configuration as soon as it's ready. Each `IProxyConfig` contains the full configuration state so nothing will be lost.
8282

aspnetcore/fundamentals/servers/yarp/destination-resolvers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ YARP uses a destination resolver to expand the set of configured destination add
2626

2727
### Startup
2828
The `IDestinationResolver` should be registered in the DI container as a singleton. At startup, the proxy will resolve this instance and call `ResolveDestinationsAsync(...)` with the configured destinations retrieved from the resolved `IProxyConfigProviders`. On this first call the provider may choose to:
29-
- Throw an exception if the provider cannot produce a valid proxy configuration for any reason. This will prevent the application from starting.
30-
- Asynchronously resolve the destinations. This will stop the application from starting until resolved destinations are available.
31-
- Or, it may choose to return an empty `ResolvedDestinationCollection` instance while it resolves destinations in the background. The provider will need to trigger the `IChangeToken` when the configuration is available.
29+
* Throw an exception if the provider cannot produce a valid proxy configuration for any reason. This will prevent the application from starting.
30+
* Asynchronously resolve the destinations. This will stop the application from starting until resolved destinations are available.
31+
* Or, it may choose to return an empty `ResolvedDestinationCollection` instance while it resolves destinations in the background. The provider will need to trigger the `IChangeToken` when the configuration is available.
3232

3333
### Atomicity
3434
The destinations objects and collections supplied to the proxy should be read-only and not modified once they have been handed to the proxy via `GetConfig()`.
@@ -37,10 +37,10 @@ The destinations objects and collections supplied to the proxy should be read-on
3737
If the `IChangeToken` supports `ActiveChangeCallbacks`, once the proxy has processed the initial set of destinations it will register a callback with this token. If the provider does not support callbacks then `HasChanged` will be polled alongside `IProxyConfig` change tokens, every 5 minutes.
3838

3939
When the provider wants to provide a new set of destinations to the proxy it should:
40-
- Resolve those destinations in the background.
40+
* Resolve those destinations in the background.
4141
- `ResolvedDestinationCollection` is immutable, so new instances have to be created for any new data.
4242
- Objects for unchanged destinations can be re-used, or new instances can be created.
43-
- Invalidate the `IChangeToken` returned from the previous `ResolveDestinationsAsync` invocation.
43+
* Invalidate the `IChangeToken` returned from the previous `ResolveDestinationsAsync` invocation.
4444

4545
Once the new destinations have been applied, the proxy will register a callback with the new `IChangeToken`. Note if there are multiple reloads signaled in close succession, the proxy may skip some and resolve destinations as soon as it's ready.
4646

aspnetcore/fundamentals/servers/yarp/dests-health-checks.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ Active health check settings can also be defined in code via the corresponding t
8484

8585
`Cluster/HealthCheck/Active` section and [ActiveHealthCheckConfig](xref:Yarp.ReverseProxy.Configuration.ActiveHealthCheckConfig):
8686

87-
- `Enabled`: Flag indicating whether active health check is enabled for a cluster. Default `false`
88-
- `Interval`: Period of sending health probing requests. Default `00:00:15`
89-
- `Timeout`: Probing request timeout. Default `00:00:10`
90-
- `Policy`: Name of a policy evaluating destinations' active health states. Mandatory parameter
91-
- `Path`: Health check path on all cluster's destinations. Default `null`.
92-
- `Query`: Health check query on all cluster's destinations. Default `null`.
87+
* `Enabled`: Flag indicating whether active health check is enabled for a cluster. Default `false`
88+
* `Interval`: Period of sending health probing requests. Default `00:00:15`
89+
* `Timeout`: Probing request timeout. Default `00:00:10`
90+
* `Policy`: Name of a policy evaluating destinations' active health states. Mandatory parameter
91+
* `Path`: Health check path on all cluster's destinations. Default `null`.
92+
* `Query`: Health check query on all cluster's destinations. Default `null`.
9393

9494
`Destination` section and [DestinationConfig](xref:Yarp.ReverseProxy.Configuration.DestinationConfig).
9595

96-
- `Health` - A dedicated health probing endpoint such as `http://destination:12345/`. Defaults `null` and falls back to `Destination/Address`.
96+
* `Health` - A dedicated health probing endpoint such as `http://destination:12345/`. Defaults `null` and falls back to `Destination/Address`.
9797

9898
### Built-in policies
9999
There is currently one built-in active health check policy - `ConsecutiveFailuresHealthPolicy`. It counts consecutive health probe failures and marks a destination as unhealthy once the given threshold is reached. On the first successful response, a destination is marked as healthy and the counter is reset.
@@ -264,19 +264,19 @@ endpoints.MapReverseProxy(proxyPipeline =>
264264

265265
`Cluster/HealthCheck/Passive` section and [PassiveHealthCheckConfig](xref:Yarp.ReverseProxy.Configuration.PassiveHealthCheckConfig):
266266

267-
- `Enabled` - flag indicating whether passive health check is enabled for a cluster. Default `false`
268-
- `Policy` - name of a policy evaluating destinations' passive health states. Mandatory parameter
269-
- `ReactivationPeriod` - period after which an unhealthy destination's passive health state is reset to `Unknown` and it starts receiving traffic again. Default value is `null` which means the period will be set by a `IPassiveHealthCheckPolicy`
267+
* `Enabled` - flag indicating whether passive health check is enabled for a cluster. Default `false`
268+
* `Policy` - name of a policy evaluating destinations' passive health states. Mandatory parameter
269+
* `ReactivationPeriod` - period after which an unhealthy destination's passive health state is reset to `Unknown` and it starts receiving traffic again. Default value is `null` which means the period will be set by a `IPassiveHealthCheckPolicy`
270270

271271
### Built-in policies
272272
There is currently one built-in passive health check policy - [`TransportFailureRateHealthPolicy`](xref:Yarp.ReverseProxy.Health.TransportFailureRateHealthPolicyOptions). It calculates the proxied requests failure rate for each destination and marks it as unhealthy if the specified limit is exceeded. Rate is calculated as a percentage of failed requests to the total number of request proxied to a destination in the given period of time. Failed and total counters are tracked in a sliding time window which means that only the recent readings fitting in the window are taken into account.
273273
There are two sets of policy parameters defined globally and on per cluster level.
274274

275275
Global parameters are set via the options mechanism using `TransportFailureRateHealthPolicyOptions` type with the following properties:
276276

277-
- `DetectionWindowSize` - period of time while detected failures are kept and taken into account in the rate calculation. Default is `00:01:00`.
278-
- `MinimalTotalCountThreshold` - minimal total number of requests which must be proxied to a destination within the detection window before this policy starts evaluating the destination's health and enforcing the failure rate limit. Default is `10`.
279-
- `DefaultFailureRateLimit` - default failure rate limit for a destination to be marked as unhealthy that is applied if it's not set on a cluster's metadata. The value is in range `(0,1)`. Default is `0.3` (30%).
277+
* `DetectionWindowSize` - period of time while detected failures are kept and taken into account in the rate calculation. Default is `00:01:00`.
278+
* `MinimalTotalCountThreshold` - minimal total number of requests which must be proxied to a destination within the detection window before this policy starts evaluating the destination's health and enforcing the failure rate limit. Default is `10`.
279+
* `DefaultFailureRateLimit` - default failure rate limit for a destination to be marked as unhealthy that is applied if it's not set on a cluster's metadata. The value is in range `(0,1)`. Default is `0.3` (30%).
280280

281281
Global policy options can be set in code as follows:
282282
```csharp
@@ -346,10 +346,10 @@ public class FirstUnsuccessfulResponseHealthPolicy : IPassiveHealthCheckPolicy
346346
## Available destination collection
347347
Destinations health state is used to determine which of them are eligible for receiving proxied requests. Each cluster maintains its own list of available destinations on `AvailableDestinations` property of the [ClusterDestinationState](xref:Yarp.ReverseProxy.Model.ClusterDestinationsState) type. That list gets rebuilt when any destination's health state changes. The [IClusterDestinationsUpdater](xref:Yarp.ReverseProxy.Health.IClusterDestinationsUpdater) controls that process and calls an [IAvailableDestinationsPolicy](xref:Yarp.ReverseProxy.Health.IAvailableDestinationsPolicy) configured on the cluster to actually choose the available destinations from the all cluster's destinations. There are the following built-in policies provided and custom ones can be implemented if necessary.
348348

349-
- `HealthyAndUnknown` - Inspects each `DestinationState` and adds it on the available destination list if all of the following statements are TRUE. If no destinations are available then requests will get a 503 error.
349+
* `HealthyAndUnknown` - Inspects each `DestinationState` and adds it on the available destination list if all of the following statements are TRUE. If no destinations are available then requests will get a 503 error.
350350
- Active health checks are disabled on the cluster OR `DestinationHealthState.Active != DestinationHealth.Unhealthy`
351351
- Passive health checks are disabled on the cluster OR `DestinationHealthState.Passive != DestinationHealth.Unhealthy`
352-
- `HealthyOrPanic` - Calls `HealthyAndUnknown` policy at first to get the available destinations. If none of them are returned from this call, it marks all cluster's destinations as available. This is the default policy.
352+
* `HealthyOrPanic` - Calls `HealthyAndUnknown` policy at first to get the available destinations. If none of them are returned from this call, it marks all cluster's destinations as available. This is the default policy.
353353

354354
**NOTE**: An available destination policy configured on a cluster will be always called regardless of if any health check is enabled on the given cluster. The health state of a disabled health check is set to `Unknown`.
355355

aspnetcore/fundamentals/servers/yarp/direct-forwarding.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ Some applications only need the ability to take a specific request and forward i
1919
[IHttpForwarder](xref:Yarp.ReverseProxy.Forwarder.IHttpForwarder) serves as the core proxy adapter between incoming AspNetCore and outgoing System.Net.Http requests. It handles the mechanics of creating a HttpRequestMessage from a HttpContext, sending it, and relaying the response.
2020

2121
IHttpForwarder supports:
22-
- Dynamic destination selection, you specify the destination for each request
23-
- Http client customization, you provide the HttpMessageInvoker
24-
- Request and response customization (except bodies)
25-
- Streaming protocols like gRPC and WebSockets
26-
- Error handling
22+
* Dynamic destination selection, you specify the destination for each request
23+
* Http client customization, you provide the HttpMessageInvoker
24+
* Request and response customization (except bodies)
25+
* Streaming protocols like gRPC and WebSockets
26+
* Error handling
2727

2828
It does not include:
29-
- Routing
30-
- Load balancing
31-
- Affinity
32-
- Retries
29+
* Routing
30+
* Load balancing
31+
* Affinity
32+
* Retries
3333

3434
## Example
3535

aspnetcore/fundamentals/servers/yarp/distributed-tracing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ As an ASP.NET Core component, YARP can easily integrate into different tracing s
2121
YARP supports distributed tracing using Open Telemetry (OTEL). When a request comes in, and there is a listener for Activities, then ASP.NET Core will propagate the [Trace Context](https://www.w3.org/TR/trace-context) trace-id, or create one if necessary, and create new spans/activities for the work performed.
2222
In addition YARP can create activities for:
2323

24-
- Forwarding Requests
25-
- Active health checks for clusters
24+
* Forwarding Requests
25+
* Active health checks for clusters
2626

2727
These will only be created if there is a listener for the [`ActivitySource`](/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs#activitysource) named `Yarp.ReverseProxy`.
2828

0 commit comments

Comments
 (0)