Skip to content

Proxy for Redis and Memcached

Because PHP doesn't have connection pools and needs to create new connections for every request.


Quotes from companies that use it:

The deployment of twemproxy was a great success. We eliminated all timeout and connection errors that were left (without buying new hardware).

Learn Redis the hard way blog post

With Twemproxy we haven’t seen any timeouts

Moving millions of user sessions from MySQL to Redis

Unfortunately, our options for connection pooling and more efficient use of connections were limited in PHP, so we had little recourse than to suffer with a high connection load and fluctuating connections against our Memcached servers

Optimizing caching Twemproxy and memcached at Flickr

Working example Wikipedia


Links to this note

These notes are unpolished collections of thoughts, unfinished ideas, and things I want to remember later. In the spirit of learning in public, I'm sharing them here. Have fun exploring, if you want!
© 2022 by Adrian Philipp