Comments (5)
Hi @deep011
-
Short answer: yes, expiration time in cold pool will not be the same as in warm pool.
Long answer: WarmUpRoute was updated in today's release, now it can set the correct expiration time. But it uses META command to achieve this, which is an extension to memcache protocol introduced in facebook fork of memcached (https://github.com/facebookarchive/memcached). This repo is not supported anymore though. The only option I see is to implement META in upstream memcached.
Currently you can workaround this issue by setting some smallexptime
in WarmUpRoute to make sure value in cold pool expires faster than in warm pool. -
Lets assume the keys are consistent if all sets and deletes to all the replicas succeeded.
If one usesAllSyncRoute
for sets/deletes, mcrouter will return "successful" reply (e.g. STORED/DELETED/NOT_FOUND) only when all replicated requests have succeeded. Client is responsible to retry in case of error, so we can make sure all replicated requests are delivered.
from mcrouter.
Hi @pavlo-fb
Thank you for this reply.
-
That is to say if i want keep the expiration time consistent, i must use the facebook fork of memcached?
-
When one replicated request is successful and another replicated request is failed, is the key in those memcached servers are not same? If so, the next time we get this key, the value maybe dirty. I do not know if you can understand what I mean.
from mcrouter.
- We don't encourage using the old Facebook memcached fork, as it's not supported anymore.
Basically there's no way to ask open source memcached about the exptime of an item, so there's no way to set the exact exptime on the new item. You can only approximate by setting a smaller exptime intentionally. - Yes, it's possible for a set to succeed in only one replica. Since the second set will fail, the client will think that the whole request "failed", and there are a few options: issue a delete for the same key (assuming deletes are reliable - that can be achieved with a reliable delete log, see asynclog option); or retry the set.
from mcrouter.
@alikhtarov
thank you for this reply.
For some abnormal situation, if the data are inconsistent among the replicas, what you will do?
from mcrouter.
@deep011 Sorry for the late reply. In these cases, if the service cannot tolerate stale data then on the publisher side we check that the set succeeded in all replicas (you can do it with a special config that would route to one replica at a time).
from mcrouter.
Related Issues (20)
- Slow performance - Redis benchmark test HOT 1
- “Stats files” wiki page has some formatting issues HOT 1
- 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
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.