Download - Moxi - Memcached Proxy
![Page 1: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/1.jpg)
moxia memcached proxy
![Page 2: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/2.jpg)
who
• steve yen
• dustin sallings
• matt ingenthron
![Page 3: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/3.jpg)
rhymes with foxy
![Page 4: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/4.jpg)
open source
![Page 5: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/5.jpg)
multithreaded C
![Page 6: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/6.jpg)
standing on the shoulders of giants
• libmemcached
• memcached
• libevent
![Page 7: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/7.jpg)
apache
web stack
php php php php
memcached memcached memcached
![Page 8: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/8.jpg)
apache
choose your weapons
php RoR Django perl
memcached memcached memcached
![Page 9: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/9.jpg)
apache
php then...
php php php php
memcached memcached memcached
![Page 10: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/10.jpg)
apache
connection mesh
php php php php
memcached memcached memcached
![Page 11: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/11.jpg)
apache
moxi
php php php php
moxi
memcached memcached memcached
![Page 12: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/12.jpg)
apache
moxi connections
php php php php
moxi
memcached memcached memcached
![Page 13: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/13.jpg)
apache
moxi connections
php php php php
moxi
memcached memcached memcached
![Page 14: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/14.jpg)
apache
moxi connections
php php php php
moxi
memcached memcached memcached
configurableconcurrency
![Page 15: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/15.jpg)
apache
protocol conversion
php php php php
ascii protocol
ascii protocol
moxi
memcached memcached memcached
![Page 16: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/16.jpg)
apache
protocol conversion
php php php php
ascii protocol
binary protocolascii protocol
moxi
memcached memcached memcached
![Page 17: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/17.jpg)
apache
auth’ed connections
php php php php
moxi
memcached memcached memcached
binary protocolauth’ed
![Page 18: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/18.jpg)
apache
consistent hashing
php php php php
moxi
memcached memcached memcached
![Page 19: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/19.jpg)
apache
consistent hashing
php php php php
memcached memcached memcached
a new server!
memcached
moxi
![Page 20: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/20.jpg)
apache
management channel
php php php php
a new server!
moxidynamic reconfigurations
and statistics
memcached memcached memcachedmemcached
![Page 21: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/21.jpg)
GET de-duplication
get item:2421
get item:2421
get item:2421
![Page 22: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/22.jpg)
apache
GET de-duplication
get a b c
memcached
get c d e
get a b c d e
get b c d
moxi
instead of...get a b cget b c dget c d e
![Page 23: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/23.jpg)
apache
front cache
php php php php
moxifront cache
memcached memcached memcached
![Page 24: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/24.jpg)
apache
front cache
php php php php
moxifront cache
memcached memcached memcached
![Page 25: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/25.jpg)
apache
front cache
php php php php
moxifront cache
Prefix-based. For limited number of hot items.
Served withouthitting wire.
Simple expirations.Meant for replication
friendly content.
memcached memcached memcached
![Page 26: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/26.jpg)
front cache
moxi moxi moxi
hot items replicated across many front caches.
memcached memcached memcached
![Page 27: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/27.jpg)
front cache
moxi moxi moxi
hot items replicated across many front caches.
memcached memcached memcached
![Page 28: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/28.jpg)
front cache
moxi moxi moxi
hot items replicated across many front caches.lazily.
memcached memcached memcached
![Page 29: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/29.jpg)
failure handling
moxi moxi moxi
memcached memcached memcached
![Page 30: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/30.jpg)
failure handling
moxi moxi moxi
memcached memcached memcached
for hiccups: configurable retry counts.then send misses and ERROR back to clients
![Page 31: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/31.jpg)
failure handling
memcached
for deep failures (and for planned server changes)dynamic reconfiguration messages
memcachedmemcached memcached
mgmtchannel
moxi moxi moxi
![Page 32: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/32.jpg)
failure handling
memcachedmemcached memcached
mgmtchannel
for deep failures (and for planned server changes)dynamic reconfiguration messages
moxi moxi moxi
memcached
![Page 33: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/33.jpg)
draining and filling
memcached memcached
mgmtchannel
lazily migrate items from old server to new server
memcachedmemcached
moxi moxi moxi
draining filling
![Page 34: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/34.jpg)
draining and filling
memcached memcached
mgmtchannel
N time later, just use filled server only
memcachedmemcached
moxi moxi moxi
drained filled
![Page 35: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/35.jpg)
timeout
![Page 36: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/36.jpg)
timeout• if a request takes more than X millisecs,
moxi should return a miss or error
![Page 37: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/37.jpg)
blackhole configuration
• GET’s become misses
• SET’s become error
• clients never wait, such as trying to make a connection to a non-existent memcached
![Page 38: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/38.jpg)
client...session[‘shopping-cart’] = user_cart;
sends... set session:123456 some_big_value
receives STORED.
continues on its way.
moxi...
receives... set session:123456 some_big_value
sees a match with configurable prefix “session:”
responds with STORED to client.
forwards to memcached asynchronously.
fire & forget SET
![Page 39: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/39.jpg)
inside moxi
• memcached
• libevent
• libmemcached
![Page 40: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/40.jpg)
inside moxi
libevent
drive_machineprotocol state machine
item manager
slabber
ascii protocol handler
binary protocol handler
memcached
hashtable
![Page 41: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/41.jpg)
inside moxi
libevent
drive_machineprotocol state machine
item manager
slabber
ascii protocol handler
ascii proxy upstream
protocol handler
binary proxy downstream
protocol handler
ascii proxy downstream
protocol handler
binary protocol handler
memcached proxy
dyna-config
libmemcached
matcherfrontcache
hashtable
![Page 42: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/42.jpg)
inside moxi
libevent
drive_machineprotocol state machine
item manager
slabber
ascii protocol handler
ascii proxy upstream
protocol handler
binary proxy downstream
protocol handler
ascii proxy downstream
protocol handler
binary protocol handler
memcached proxy
dyna-config
libmemcached
matcherfrontcache
hashtable
![Page 43: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/43.jpg)
moxi embeds memcached
libevent
drive_machineprotocol state machine
item manager
slabber
ascii protocol handler
ascii proxy upstream
protocol handler
binary proxy downstream
protocol handler
ascii proxy downstream
protocol handler
binary protocol handler
memcached proxy
dyna-config
libmemcached
matcherfrontcache
hashtable
![Page 44: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/44.jpg)
moxi’s can talk to themselves
but, they think they’re talking to memcached
moxi moxi moxi
![Page 45: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/45.jpg)
memcached
moxi moxi moxi
and, they still think they’re talking to just memcached
moxi’s can talk to themselvesand to memcached
![Page 46: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/46.jpg)
memcached memcached
moxi moxi moxi
and, they still think they’re talking to just memcached
moxi’s can talk to themselvesand to memcached
![Page 47: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/47.jpg)
memcached memcached memcached
moxi moxi moxi
and, they still think they’re talking to just memcached
moxi’s can talk to themselvesand to memcached
![Page 48: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/48.jpg)
memcached tokyotyrant
memcachedb
moxi moxi moxi
and, they still think they’re talking to just memcached
moxi’s can talk to themselvesand to memcached(*)
![Page 49: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/49.jpg)
starting
• memcached -m 512
• moxi -m 512 -z [configkey]
memcachedcommand-line
moxicommand
line
![Page 50: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/50.jpg)
when can I get moxi?
![Page 51: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/51.jpg)
today
• upcoming features
• draining/filling - August 2009
• everything else is done
• Available Now
![Page 52: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/52.jpg)
where can I get moxi?
![Page 53: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/53.jpg)
links
• getting moxi
• http://labs.northscale.com/moxi
• read, join list
![Page 54: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/54.jpg)
support, training
• available from NorthScale, Inc.
• 888.399.5509
![Page 55: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/55.jpg)
questions?
![Page 56: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/56.jpg)
thanks!
photo credits
• http://flickr.com/photos/davebluedevil/15877348/
• http://www.flickr.com/photos/theamarand/2874288064/
• http://www.flickr.com/photos/splityarn/3469596708/
• http://www.flickr.com/photos/heisnofool/3241930754/
• http://www.flickr.com/photos/onourminds/2885704630/
• http://www.flickr.com/photos/lunaspin/990825818/
![Page 57: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/57.jpg)
![Page 58: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/58.jpg)
talking to itselfoptimization
![Page 59: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/59.jpg)
stats aggregation
moxi
memcached memcached memcached
broadcasts “stats”. sums the responses.
![Page 60: Moxi - Memcached Proxy](https://reader031.vdocument.in/reader031/viewer/2022020920/54b79e9e4a79590e758b45dd/html5/thumbnails/60.jpg)
flush_all
moxi
memcached memcached memcached
broadcasts “flush_all” to memcached servers