build of Nginx with memcache module
143
Build of Nginx with memcache module.
In case of mid/large scale we need to avoide hassle to hit all requests to our application server, so i using nginx with memcached module make full page cache to get/set requests from our memcached server if our page is not in cache once we hit it nginx can set the key and any new request in the same page will served from our cache server
$ docker run --name web-nginx -v /path/nginx.conf:/etc/nginx/nginx.conf:ro -d -p 8080:80 linuxawy/nginx-memcache
You can hit http://localhost:8080 or http://host-ip:8080 in your browser.
http {
upstream backend {
server memcached:11211;
# a pool with at most 1024 connections
# and do not distinguish the servers:
keepalive 1024;
}
server {
...
location /memc {
set $memc_cmd get;
set $memc_key $arg_key;
memc_pass backend;
}
}
}
Content type
Image
Digest
Size
183.1 MB
Last updated
almost 7 years ago
docker pull linuxawy/nginx-memcache