Policy fuse cutout Experience

     Polly的概念:Polly是一个被.net基金会支持认可的框架,Polly是一个.NET弹性和瞬态故障处理库,允许开发人员以流畅和线程安全的方式表达策略,如重试、断路器、超时、隔离和回退。

The concept of fusing downgrade

Demote

The purpose is to downgrade when a service provider fails, the return to the caller an alternative response or wrong response.
Server when pressure surge, according to the current business situation and flow of some services and strategically pages of downgraded pressure in this part of server resources, to ensure the normal operation of the core business, while maintaining the majority of customers and customers get the right response simply put: the server could not handle, then give a return to the default page do return to the default and customized according to different interfaces, so it is more flexible..
automatically downgraded: timeout, the number of failures, the fault current limiter
configuration well timeout (asynchronous mechanism to detect reply circumstances); instability in the number of calls to a certain number of interfaces downgrade (asynchronous mechanism to detect reply circumstances);
remote service invocation failures (dns, http service error status code, network failure, Rpc service exception ), direct downgrade.
artificial downgrade: spike, double XI promote
downgrade non-essential services

Service fuse

In the broader interpretation, the fuse mainly refers to control trading risk stocks, futures or other financial derivative products, provision limiting its range daily price fluctuations, once the price touches the upper and lower sections, the transaction is automatically interrupted a period of time ( "That is melting off"), or for that matter "lie flat" and not limit exceeded ( "melt continuously").
Software system inside because of some reason, the service appears overload phenomenon, in order to prevent total system failure and the use of some protective measures, overload protection.
Common: the purpose of the final performance, size, autonomy
difference: trigger causes the management target levels, Method to realize

 服务降级考虑问题
 核心服务、非核心服务、是否支持降级、降级策略、业务放通场景,策略

summary

本篇主要讲解熔断、降级的基本概念,后面将会继续更新.

Guess you like

Origin www.cnblogs.com/yyfh/p/11433115.html