Closed mingkhuang closed 3 years ago
๐ it's an interface - I would suggest either:
Default
type of limiter && listener.Default
is an easy-getting started implementation.BTW, do you evaluate these algorithms? How about the results? What is your scenery to use these algorithms?
Effectively this is applying Little's Law + a few alternative algorithms for queueing theorems on how a dynamic system behaves and the appropriate stable conditions. Keep in mind while the library applies the given algorithms, it isn't prescriptive about how to determine the appropriate tune-ables, this will require careful measurement, planning and planning game-days to validate your assumptions and changes.
For 1, do you mean adding an option to DefaultLimiter to control which SampleWindow to use? For 2, it leads to too much duplicated code, I think. For BTW, do you mean that these algorithms are just reference, we need to adjust them carefully for usage?
Thanks!
For 1, do you mean adding an option to DefaultLimiter to control which SampleWindow to use?
Yes ๐
For 2, it leads to too much duplicated code, I think.
totally fair
For BTW, do you mean that these algorithms are just reference, we need to adjust them carefully for usage?
Right the algorithms are just logical implementations of tuning dynamic system feedback throttling. The hardest part is not the code, but tuning your parameters which requires some good observability and good SLO commitments from the downstream services this would be leveraging.
An example might be:
There are other strategies like the Vegas style which leverages the limit + measurement samples to dynamically adjust the throttling based on observed measurements of Service B. Which is useful if Service B begins to become degraded, you're effectively preventing thundering herd problems but not totally turning off all requests.
You might think of this as a dynamic adaptive circuit breaker.
Previously, I thought adaptive algorithms need no tune, and they can free us from tedious tuning work. It seems I'm too naive. So, what is the advantage of adaptive algorithms compared to fixed threshold strategy? Adapt to changing environment?
Thanks๏ผ
Consider this a level 2
type of tool on the quest to smarter ("level 3+") tooling ๐ It makes some assumptions and needs some guidelines. Though that isn't to say another tool or automation couldn't introspect your current configurations and dynamic systems to auto-tune the behavior.
Thanks! You teach me a lot. The issue could be closed.
๐
Hi, I want to get a Limiter as below. What is the suitable way? Thanks! BTW, do you evaluate these algorithms? How about the results? What is your scenery to use these algorithms?