{"id":24324,"date":"2015-06-09T14:13:49","date_gmt":"2015-06-09T12:13:49","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=24324"},"modified":"2015-06-09T14:13:49","modified_gmt":"2015-06-09T12:13:49","slug":"nginx-and-memcached-a-400-boost","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2015\/06\/09\/nginx-and-memcached-a-400-boost\/","title":{"rendered":"Nginx and Memcached, a 400% boost!"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>Here is an idea to try on a slow weekend: <a href=\"https:\/\/www.igvita.com\/2008\/02\/11\/nginx-and-memcached-a-400-boost\/\">Nginx and Memcached, a 400% boost!<\/a><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/06\/nginx_memcache.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"24325\" data-permalink=\"https:\/\/mamchenkov.net\/wordpress\/2015\/06\/09\/nginx-and-memcached-a-400-boost\/nginx_memcache\/\" data-orig-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/06\/nginx_memcache.png?fit=471%2C284&amp;ssl=1\" data-orig-size=\"471,284\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"nginx_memcache\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/06\/nginx_memcache.png?fit=471%2C284&amp;ssl=1\" class=\"aligncenter size-full wp-image-24325\" src=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/06\/nginx_memcache.png?resize=471%2C284&#038;ssl=1\" alt=\"nginx_memcache\" width=\"471\" height=\"284\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>Memcached, the darling of every web-developer, is capable of turning almost any application into a speed-demon. Benchmarking one of my own Rails applications resulted in ~850 req\/s on commodity, non-optimized hardware &#8211; more than enough in the case of this application. However, what if we took Mongrel out of the equation? Nginx, by default, comes prepackaged with the <a href=\"http:\/\/wiki.codemongers.com\/NginxHttpMemcachedModule\">Memcached module<\/a>, which allows us to bypass the Mongrel servers and talk to Memcached directly. Same hardware, and a quick test later: ~3,550 req\/s, or almost a <strong>400% improvement<\/strong>! Not bad for a five minute tweak!<\/p><\/blockquote>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Here is an idea to try on a slow weekend: Nginx and Memcached, a 400% boost! &nbsp; Memcached, the darling of every web-developer, is capable of turning almost any application into a speed-demon. Benchmarking one of my own Rails applications resulted in ~850 req\/s on commodity, non-optimized hardware &#8211; more than enough in the case &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2015\/06\/09\/nginx-and-memcached-a-400-boost\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Nginx and Memcached, a 400% boost!<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Nginx and Memcached, a 400% boost! #SysAdmin #DevOps #WebDev #Nginx #performance","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18,133,62,1334],"tags":[3164,1057,1330],"keyring_services":[],"class_list":["post-24324","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-sysadmin","category-technology","category-web-work","tag-nginx","tag-performance","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27314,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/02\/09\/mcrouter-a-memcached-protocol-router\/","url_meta":{"origin":24324,"position":0},"title":"Mcrouter: a memcached protocol router","author":"Leonid Mamchenkov","date":"February 9, 2017","format":false,"excerpt":"Mcrouter is an Open Source tool developed by Facebook for scaling up the memcached deployments: Mcrouter is a memcached protocol router for scaling memcached (http:\/\/memcached.org\/) deployments. It's a core component of cache infrastructure at Facebook and Instagram where mcrouter handles almost 5 billion requests per second at peak. Here is\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/02\/mcrouter-500x375.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":27972,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/09\/08\/nginx-unit\/","url_meta":{"origin":24324,"position":1},"title":"Nginx Unit","author":"Leonid Mamchenkov","date":"September 8, 2017","format":false,"excerpt":"\u00a0 Nginx Unit looks interesting: What is NGINX Unit? NGINX Unit is a new, lightweight, open source application server built to meet the demands of today\u2019s dynamic and distributed applications. Deploy configuration changes with no service disruptions. Run code in multiple languages. Build the foundation of your service mesh. An\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/09\/nginx-unit-500x336.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":27440,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/03\/20\/nginx-amplify-comprehensive-nginx-monitoring\/","url_meta":{"origin":24324,"position":2},"title":"Nginx Amplify : comprehensive Nginx monitoring","author":"Leonid Mamchenkov","date":"March 20, 2017","format":false,"excerpt":"Somehow I missed the announcement of the Nginx Amplify (beta) back in November of last year, so here it goes now. Nginx Amplify is a new tool for the comprehensive monitoring of Nginx web servers. \u00a0Here's what it can do for you: Visually identify performance bottlenecks, overloaded servers, or potential\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/03\/nginx-amplify-500x257.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26306,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/08\/04\/504-gateway-timeout-error-on-nginx-fastcgi-php-fpm\/","url_meta":{"origin":24324,"position":3},"title":"504 Gateway Timeout error on Nginx + FastCGI (php-fpm)","author":"Leonid Mamchenkov","date":"August 4, 2016","format":false,"excerpt":"\"504 Gateway Timeout\" error is a very common issue when using Nginx with PHP-FPM. \u00a0Usually, that means that it took PHP-FPM longer to generate the response, than Nginx was willing to wait for. \u00a0A few possible reasons for this are: Nginx timeout configuration uses very small values (expecting the responses\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"504","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/08\/504-500x385.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":18031,"url":"https:\/\/mamchenkov.net\/wordpress\/2013\/04\/16\/apache2-vs-nginx-for-php-application\/","url_meta":{"origin":24324,"position":4},"title":"Apache2 vs Nginx for PHP application","author":"Leonid Mamchenkov","date":"April 16, 2013","format":"link","excerpt":"Apache2 vs Nginx for PHP application The conclusion is that it doesn\u2019t matter which server you are going to chose. The real performance wins are purely on PHP side. Using an accelerator with caching can multiply the number of requests your infrastructure can maintain.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28234,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/11\/21\/nginx-module-vts-nginx-virtual-host-traffic-status-module\/","url_meta":{"origin":24324,"position":5},"title":"nginx-module-vts &#8211; Nginx virtual host traffic status module","author":"Leonid Mamchenkov","date":"November 21, 2017","format":false,"excerpt":"nginx-module-vts is a handy Nginx module for those who run complex Nginx configurations, with multiple servers, virtual hosts, caches, etc.\u00a0 Here's an example partial screenshot of the output.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/11\/nginx-500x441.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=24324"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24324\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=24324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=24324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=24324"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=24324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}