ShaneKm
ShaneKm

Reputation: 21368

ASP.NET Core HealthChecks

Can anyone please explain what the "timeout" param does in .AddUrlGroup()?

Is it the timeout of httpClient - meaning how long it will wait for the response from that endpoint?

Or the frequency at which this Url will be pinged?

enter image description here

Upvotes: 1

Views: 952

Answers (1)

Markus
Markus

Reputation: 22511

As far as I understand the code, there are several timeout values that you can configure. On the one hand, there is the "global" timeout that the parameter references. If no specific timeouts are set, this value is also used for the timeout of the HTTP requests. See this link for the code.

In addition, you can configure a timeout for each URI that you want to query. If this is set, it overrides the global timeout.

Also, the health check itself uses the global timeout value. Therefore, if you want to query several URIs and the first on times out, the health check as a whole will timeout.

The timeout parameter does not define the interval that the check is run for.

Upvotes: 3

Related Questions