Comments (25)
Is this issue closed? Binary protocol support will be great
from mcrouter.
It looks like PHP7 uses binary protocol for the memcached session handler by default these days. That means you get a pretty ugly error like:
Fatal Error: session_start(): Failed to create session ID: memcached
Since mcrouter doesn't support binary protocol, you'll need to tell PHP not to use it for sessions:
memcached.sess_binary_protocol = 0
So I'm betting this thread will get more and more visitors as people try to put PHP7 and Mcrouter together for the first time.
from mcrouter.
I'd like to take on this task
from mcrouter.
From experience the binary protocol allows for much higher performance (overall) compared to plain text one, mainly because you can then use compression on the data and keys you set in memcacheD instances.
From there you are greatly reducing:
- The cache storage needs of the system. As a plus-side, you can cache more on the same servers or cache the same with less, saving either further CPU cycles on application layer or some more money in the pocket.
- The network transfer times for cache reads, as the data is compressed and not a in plain text format it is usually around 10 times smaller (or more). This should improve network related delays and related bottlenecks.
The only problem is that client side will have some more overhead in CPU to consume the data, but that is usually negligible compared to the network delays to fetch it. Thus having compression for memcache is a net-positive performance-wise.
I am a huge +1 on having binary protocol supported in mcrouter. This will allow us to test and experiment with all of it's features. As it is at the moment, we can not use this software, as we depend on compression for our servers to run normally.
from mcrouter.
Would love to see Binary protocol supported as well. We use it for performance reasons too.
from mcrouter.
@renchap yes, the Umbrella protocol is something we use internally at Facebook. We don't want to document it in detail, since it probably won't be useful outside of Facebook, and we also want to have flexibility to change the format.
I like the idea of supporting the open source binary protocol, and it wouldn't be too difficult to implement. It would be ideal if we got a pull request for implementing this :)
from mcrouter.
Anyone with C++ skills want to tackle this? Maybe we can get some precisions on where in the codebase this change would happen, to make it easier for a contributor to start attacking the problem.
from mcrouter.
if the mcrouter currently supports the binary protocol now?
@renchap
if the binary protocol have a good performance to the ascii protocol?
from mcrouter.
if the binary protocol have a good performance to the ascii protocol?
from mcrouter.
mcrouter does not currently support the memcached binary protocol. It does have a mcrouter-to-mcrouter binary protocol called umbrella, but memcached doesn't know how to parse it, so it's only useful in routing networks.
On Mar 7, 2015, at 3:03 AM, liyufu [email protected] wrote:
if the binary protocol have a good performance to the ascii protocol?
—
Reply to this email directly or view it on GitHub.
from mcrouter.
Any updates on this? We need binary protocol support before we can use mcrouter.
from mcrouter.
@amckinley: hi, no updates at this time. By the way, could you share how the binary protocol helps in your case? We're actually evaluating whether to migrate from ASCII to binary internally for memcached - some things we can think of is slightly better parsing performance (due to known sizes), and reply/request matching (less parsing bugs).
from mcrouter.
We use the binary protocol because it seemed easier than worrying about ASCII-encoding binary keys like hashes or UTF-8 strings, and seemed faster as well for the reasons you mentioned. Would love to see support in mcrouter!
from mcrouter.
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
from mcrouter.
we currently use the binary protocol with the enyim client, and we were hoping to plug in mcrouter to enable the replication and warm up features. But the ascii only support seems to be a major impediment.
we installed a mcrouter docker container, but on the initial tests the ascii items are timing out. is there some client tweak recommended or required other than specifying protocol is text?
from mcrouter.
+1
from mcrouter.
I was poking around in the latest version of the code (by no means am I an expert) and noticed some binary support stuff. Any update?
from mcrouter.
@barryhatfield, mcrouter supports a binary protocol (called Caret, if you see that word in our codebase) that has nothing to do with open-source memcached's binary protocol.
Unfortunately, at this point, we have no plans to add support for open-source memcached's binary protocol ourselves since we're happy with using Caret and ASCII internally. But, we would be willing to help guide anyone who wanted to contribute pull requests for open-source binary support.
from mcrouter.
@Ngo-The-Trung great!
Let us know if you need anything, we will be happy to help.
from mcrouter.
I am also interested to work on this, @Ngo-The-Trung lets get in touch.
from mcrouter.
@Ngo-The-Trung Are you still working on this? If not, I'd be happy to take this track of work up. I'd really like to see mcrouter support the binary memcached protocol, too.
from mcrouter.
@ELD please take over
from mcrouter.
@Ngo-The-Trung Thank you, will do.
from mcrouter.
Any updates on support for binary protocol.
from mcrouter.
As they've mentioned mcrouter does support binary protocol for transferring data.
This will reduce the network overhead in a case where you have 2-step mcrouter setup like:
box 1: web app + mcrouter1.
Box 2: Memcache + mcrouter2
The communication channel would be like:
- web app -> mcrouter1 (text, unix socket)
- mcrouter1 -> mcrouter2 (binary, non-standard, network)
- mcrouter2 -> memcached (text, unix socket)
I have not tested this but in reality it should reduce network overheads (at least) and allow for all the features to be used.
Will it be faster will likely depend on the workload.
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.