Page MenuHomePhabricator

Package and deploy Mcrouter as a replacement for twemproxy
Closed, ResolvedPublic

Description

Mcrouter is a memcached / redis protocol router. Like twemproxy, Mcrouter enables connection pooling and automatic sharding of data across multiple servers. Unlike twemproxy, it provides facilities for replicating hot data to multiple servers / pools, and for key-prefix-based routing.

To see how this is valuable, consider the parser cache: parser cache entries represent immutable content objects, so they don't need to be updated or purged. With prefix-based routing and replication, we could have SET operations on parser cache objects replicated to codfw, so that its parser cache is kept perennially warm. (We would need to change some key conventions, since parser cache entries are prefixed with the wiki ID, followed by 'pcache'; we'd need it the other way around.)

Event Timeline

fgiunchedi added a subscriber: Joe.

I just have one doubt about this: are we using the memcached binary protocol at all anywhere?

this would also allow replicating redis traffic, but there is one big caveat: data would flow unencrypted between datacenters AFAICS, and that is indeed a problem - we definitely don't want to activate ipsec between the mediawikis and the redises/memcacheds.

I finallly got to a point where a debian package (at least a basic version) is not far down the line:

  • I included in the source folly, fbthrift and wangle under third-party (like HHVM does)
  • I modified the automake templates to link statically to such libraries

and now I should be able to create a consistent package.

Change 288196 had a related patch set uploaded (by Giuseppe Lavagetto):
Initial debianization

https://gerrit.wikimedia.org/r/288196

Joe removed Joe as the assignee of this task.Oct 3 2016, 2:09 PM
Joe added a project: User-Joe.

Change 288196 merged by Giuseppe Lavagetto:
Initial debianization

https://gerrit.wikimedia.org/r/288196

Mentioned in SAL (#wikimedia-operations) [2016-10-31T10:08:54Z] <_joe_> uploaded mcrouter 0.24.0-1 to jessie-wikimedia T132317

@aaron the package has been prepared and uploaded to jessie-wikimedia; feel free to experiment with it somewhere safe (i.e. in deployment-prep first, I guess)

Joe claimed this task.