Nginx Memcached with SASL support

Nginx has that great ngx_http_memcached_module that allows to serve static content directly from Memcached.

It’s pretty easy to set up


server {
location / {
set $memcached_key "$uri";
memcached_pass host:11211;
error_page 404 502 504 = @fallback;
}

location @fallback {
proxy_pass http://backend;
}
}

Unfortunately it does not support the binary protocol nor the SASL authentication as pointed out here.

This makes it impossible to integrate with memcached as a service providers due to authentication limitations.

That’s really a bad decision from nginx and makes memcached as a service and Infrastucture as a Service (IaaS) less attractive when it comes to speed optimizations with nginx and memcached.