alibaba / Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
https://sentinelguard.io/
Apache License 2.0
22.36k stars 8.02k forks source link

How to migrate from resilience4j to Sentinel #1510

Open jiuli opened 4 years ago

jiuli commented 4 years ago

resilience4j 如何改用 sentinel?

jiuli commented 4 years ago

CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig.custom() .failureRateThreshold(50) .waitDurationInOpenState(Duration.ofMillis(1000)) .ringBufferSizeInHalfOpenState(2) .ringBufferSizeInClosedState(2) .recordExceptions(IOException.class, TimeoutException.class) .ignoreExceptions(BusinessException.class, OtherBusinessException.class) .enableAutomaticTransitionFromOpenToHalfOpen() .build() ————————————————

cdfive commented 4 years ago

May refer to: https://github.com/alibaba/Sentinel/wiki/如何使用 https://github.com/alibaba/Sentinel/wiki/熔断降级

sczyh30 commented 4 years ago

We may add some instructions regarding how to migrate from resilience4j to Sentinel later :)