Comments (3)
@jamescarr there are couple of options you can tune to have desirable behavior of handling Soft TKOs.
Let's see what happens with TKO logic step-by-step.
First of all, when is a box marked as "Soft TKO"?
After mcrouter has received >= --timeouts-until-tko timeouts in a row from this box. But only if total number of boxes marked as Soft TKO is less than --maximum-soft-tkos.
What about Hard TKO?
A box is marked as hard TKO after mcrouter has encountered connect error or connect timeout. Even one connect error/timeout is enough, mcrouter doesn't wait for --timeouts-until-tko to mark box as Hard TKO.
What happens after a box is marked as TKO (be it hard or soft)?
Mcrouter starts sending version
requests (aka probes) to this box. Every other request sent to this box is immediately discarded.
First probe is sent after --probe-timeout-initial milliseconds since box was marked as TKO.
Interval between consecutive probes exponentially grows until it reaches --probe-timeout-max.
When do we unmark the box marked as TKO?
Once mcrouter gets a successful reply (not error or timeout) on probe request.
How do I check which servers are marked as TKO?
Try stats servers
and stats suspect_servers
stats commands
Why do we need TKO logic at all?
Usually when some memcached server is slow/down/overloaded, we want to simply send request to a failover destination. Once memcached server is marked TKO, failover becomes is instant, we don't need to do 2 round trips (one to known slow/broken box, one to failover destination) for a request.
I don't want any TKO tracking!
One can disable it with --disable-tko-tracking.
That said, try to tune TKO behavior using options described above. Increasing server timeout/limiting number of soft TKOs/decreasing first probe timeout may help if you see lots of errors caused by TKO behavior.
If you see any weird behavior (e.g. mcrouter incorrectly marks/unmarks box as TKO), please provide some details so we can find the root cause.
from mcrouter.
Hi @alikhtarov, to increase server timeout which options should I use? Because I see that --server-timeout
is deprecated:
-t, --server-timeout server timeout in ms (DEPRECATED try to use cluster-server-timeout and regional-server-timeout) [default: 1000]
But I don't see cluster-server-timeout
and regional-server-timeout
options. Does this actually mean --cluster-pools-timeout
and --regional-pools-timeout
instead?
from mcrouter.
Leaving these links just in case someone else also comes over this.
Timeout settings defined in header file ("server-timeout" is followed by more specific timeouts, which, if specified, will override it):
mcrouter/mcrouter/mcrouter_options_list.h
Line 518 in d123567
Timeout docs: https://github.com/facebook/mcrouter/wiki/Command-line-options#timeouts
from mcrouter.
Related Issues (20)
- Simple replication model not working as expected HOT 1
- `mg` for WarmupRoute?
- CentOS 8 RPM/Build Support HOT 1
- Cannot build ubuntu20 docker file HOT 5
- Memcached server specification (TLS/SSL) documentation HOT 1
- Error to build docker image with docker file... HOT 1
- Last stable version
- Warmup related configuration incase we are running mcrouter and memcache on kubernetes
- Mcrouter adds MC_MSG_FLAG_BIG_VALUE flag but never removes it HOT 4
- AsyncSocketException: AsyncMcClient, type = Socket not open HOT 1
- unable to build new py3 thrift changes in upstream
- ubuntu 20.04 building issue HOT 1
- Failed to build on Ubuntu 22.04 HOT 1
- Addition of a pre-populated replica
- New Ubuntu package HOT 2
- Failed to build on ubuntu18.04
- How can I traverse a server in the pool? HOT 1
- Issues after memcached version upgrade
- does AllFastestRoute route consider miss as errors?
- folly build error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcrouter.