Construction of a detectable with high availability ASP.NET Core Services - Study Notes

Summary

With the development of modern micro-services architecture, positioning system failure and rapid recovery faces many challenges, building a service detectable, help online support team time control applications operating conditions more and more important. Availability of this share will explain how to make ASP .NET Core application with the perfect blend of modern cloud infrastructure, improve service detectability, online protection system.

The evolutionary history of technical architecture

  • Monomers architecture
  • Service oriented architecture (SOA)
  • Micro Services Architecture
  • Service Mesh

Architectural challenges brought about by evolution

  • Application of the demolition of more
  • More and more complex topologies
  • Fault location difficult

Which may need to be applied to detect scene

  • Automatic fault isolation
  • Fault location investigation
  • Service availability detection
  • Service Performance Test

.NET Core detectability support

  • Logging framework (Logging)
  • Diagnostic Framework (Diagnostics)
  • Health check frame (HealthChecks)

.NET Core logging framework - Microsoft.Extensions.Logging

Logging framework features of .NET Core

.NET Core logging framework applicable scene

  • User request logs
  • Exception logging
  • Call logs external interface
  • Warning output debugging of complex components

Log tips

.NET Core diagnostic framework - System.Diagnostics

The main categories:

System.Diagnostics.DiagnosticListener

System.Diagnostics.DiagnosticSource

Diagnostic framework features of .NET Core

  • Publish and subscribe event design model
  • It supports any object tracking
  • Support for dynamic switch
  • Support listening screening

Diagnostic Framework .NET Core of application scenarios

  • When logging component can not meet demand
  • When expectations for the implementation of the internal components of the tracking process
  • When the desired specific event occurs, modify the external component object

Applications of Diagnostic Framework .NET Core

  • HttpClient
  • MySql.Data
  • CAP Components
  • SkyWalking .NET

ASP .NET Core health check frame - Microsoft.AspNetCore.Diagnostics.HealthChecks

Health Check framework features of ASP .NET Core

ASP .NET Core Framework application scenario of health checks

  • 检查应用端口是否可访问
  • 检查应用依赖服务是否可访问
  • 检查应用内组件是否正常工作

与云服务融合实现故障隔离

  • 负载均衡的健康检查
  • K8S 的 LivenessProbe

与监控系统打通

  • 监控系统探针访问健康检查接口
  • 主动推送健康检查结果到监控系统

愿景

持续提高开发者的幸福感

视频链接

用ASP.NET Core构建可检测的高可用服务

知识共享许可协议

本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。

欢迎转载、使用、重新发布,但务必保留文章署名 郑子铭 (包含链接: http://www.cnblogs.com/MingsonZheng/ ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。

如有任何疑问,请与我联系 ([email protected]) 。

Guess you like

Origin www.cnblogs.com/MingsonZheng/p/12078812.html