Edition 0 Updated to asp. Net core 0



Yüklə 11,82 Mb.
Pdf görüntüsü
səhifə267/288
tarix12.07.2023
ölçüsü11,82 Mb.
#136458
1   ...   263   264   265   266   267   268   269   270   ...   288
NET-Microservices-Architecture-for-Containerized-NET-Applications

Additional resources 

Circuit Breaker pattern
https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker
 
Health monitoring 
Health monitoring can allow near-real-time information about the state of your containers and 
microservices. Health monitoring is critical to multiple aspects of operating microservices and is 
especially important when orchestrators perform partial application upgrades in phases, as explained 
later. 
Microservices-based applications often use heartbeats or health checks to enable their performance 
monitors, schedulers, and orchestrators to keep track of the multitude of services. If services cannot 
send some sort of “I’m alive” signal, either on demand or on a schedule, 
your application might face 
risks when you deploy updates, or it might just detect failures too late and not be able to stop 
cascading failures that can end up in major outages. 
In the typical model, services send reports about their status, and that information is aggregated to 
provide an overall view of the state of health of your application. If you’re using an orchestrator, you 
can provide health information to your orchestrator’s cluster, so that the cluster can act accordingly. If 
you invest in high-q
uality health reporting that’s customized for your application, you can detect and 
fix issues for your running application much more easily. 


312 
CHAPTER 7 | Implement resilient applications 
Implement health checks in ASP.NET Core services 
When developing an ASP.NET Core microservice or web application, you can use the built-in health 
checks feature that was released in ASP .NET Core 2.2 
(
Microsoft.Extensions.Diagnostics.HealthChecks
). Like many ASP.NET Core features, health checks 
come with a set of services and a middleware. 
Health check services and middleware are easy to use and provide capabilities that let you validate if 
any external resource needed for your application (like a SQL Server database or a remote API) is 
working properly. When you use this feature, you can also decide what it means that the resource is 
healthy, as we explain later. 
To use this feature effectively, you need to first configure services in your microservices. Second, you 
need a front-end application that queries for the health reports. That front-end application could be a 
custom reporting application, or it could be an orchestrator itself that can react accordingly to the 
health states. 

Yüklə 11,82 Mb.

Dostları ilə paylaş:
1   ...   263   264   265   266   267   268   269   270   ...   288




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin