krakend / krakend-circuitbreaker Goto Github PK
View Code? Open in Web Editor NEWA collection of curated circuit breaker adaptors for the KrakenD framework
Home Page: http://krakend.io/
License: Apache License 2.0
A collection of curated circuit breaker adaptors for the KrakenD framework
Home Page: http://krakend.io/
License: Apache License 2.0
Hello,
Since sony/gobreaker support naming each circuit breaker, I believe it would be a nice and simple addition to the Config
struct, because as it is when a user enables LogStatusChange
the log line always reads:
[KRAKEND] 2020/06/24 - 17:40:32.752 โถ WARNIN circuit breaker named '' went from 'closed' to 'open'
Hey, I was wondering if it's at all possible to integrate this into the opencensus exporters. Currently there is no automatic way (aside from parsing the log entries) to find out whether a circuit breaker is tipped or not.
Hi,
Krakend version = v2.6.3.
The following config produces a log when the breaker's status changes:
{
"version": 3,
"port": 8080,
"echo_endpoint": true,
"endpoints": [
{
"endpoint": "/test/{var}",
"backend": [
{
"host": [
"http://127.0.0.1:8080"
],
"url_pattern": "/",
"extra_config": {
"qos/circuit-breaker": {
"interval": 60,
"timeout": 10,
"max_errors": 3,
"name": "krakend-circuitbreaker",
"log_status_change": true
}
}
}
]
}
]
}
However, when no-op
encoding is added, no log is produced when the breaker's status changes:
{
"version": 3,
"port": 8080,
"echo_endpoint": true,
"endpoints": [
{
"endpoint": "/test/{var}",
"output_encoding": "no-op",
"backend": [
{
"encoding": "no-op",
"host": [
"http://127.0.0.1:8080"
],
"url_pattern": "/",
"extra_config": {
"qos/circuit-breaker": {
"interval": 60,
"timeout": 10,
"max_errors": 3,
"name": "krakend-circuitbreaker",
"log_status_change": true
}
}
}
]
}
]
}
The docs have this:
There is a small difference in behavior when you use the circuit breaker with no-op encoding vs. the rest of the encodings.
Is this behaviour expected?
Thanks.
Hi
the Eapache krakend-circuitbreaker uses "github.com/eapache/go-resiliency/breaker"
but the link changed.
please fix this issue.
Thanks
In my tests I played with very low values for maxErrors
(e.g. 2) and I see always maxErrors + 1
hits in my backend, before the cricuit breaker kicks in.
I assume, the reason is, the following line in gobreaker.go
(https://github.com/devopsfaith/krakend-circuitbreaker/blob/master/gobreaker/gobreaker.go#L95)
return counts.ConsecutiveFailures > uint32(cfg.MaxErrors)
I assume, the condition should be:
return counts.ConsecutiveFailures >= uint32(cfg.MaxErrors)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.