SlideShare a Scribd company logo
Boosting Django 
Performance with the 
Nginx Reverse Proxy 
Cache 
(I need to find better titles���)
Your site is lame!
Why?
Nginx

Recommended for you

To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)

"We're hiring!" How many times have you heard this phrase at a conference? Every database-driven company is hiring and that makes for pretty stiff competition when trying to get a new DBA. Instead of searching for the perfect database administrator from a conference or Linkedin, why not look internally at your organization for system administrators or engineers who may be an equally good fit given the right training. In this talk, I'll explain how the DBAs at Box developed a knowledge-sharing culture around databases and disseminated important learnings to other members of the company. I'll also cover the mentorship process we established to train other members of our Operations team to become rock star DBAs and manage our MySQL and HBase infrastructure at Box.

boxboxhqreference
Genkidama:実装と課題
Genkidama:実装と課題Genkidama:実装と課題
Genkidama:実装と課題

Genkidama is a P2P content distribution system built using Java and DHT techniques. It uses NicoCache for storage and OpenChord for the DHT overlay. It supports 300 concurrent users and was developed by Daiki for uses including P2P SIP and livedoor. It provides a web dashboard and integrates various technologies like NAT traversal, XMLRPC, and a GUI.

Backing up thousands of containers
Backing up thousands of containersBacking up thousands of containers
Backing up thousands of containers

This document discusses the challenges of building a backup system for thousands of containers. It describes the architecture of the backup systems the presenter has built over time, which use LVM and thin provisioning to back up each container to its own logical volume. Network speeds can be a bottleneck for large restores. The current system schedules daily incremental backups of 100,000 containers across multiple backup nodes. Issues encountered include corrupted metadata from too many logical volumes, sluggish performance from device scanning, and crashes from discarding data in older LVM versions. The system now backs up at the account level instead of whole containers to speed up restores.

backupslvmrsync
Gunicorn Nginx
Gunicorn Nginx 
DB
Gunicorn Nginx 
DB FS
Gunicorn Nginx 
DB FS

Recommended for you

04 web optimization
04 web optimization04 web optimization
04 web optimization

This document discusses various techniques for optimizing website performance, including: reducing page generation time through caching and opcode caching; minimizing round-trip times by leveraging browser caching, combining files, and parallel downloads; decreasing response sizes by gzipping files, image optimization, and cookieless domains; and tools for analyzing performance like XDebug. The goal is to share experiences helping to increase traffic to websites with average resources.

hanoi php day 2010
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishReverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and Varnish

Discover the very wide world of web servers, in addition to the basic web deliverance fonctionnality, we will cover the reverse proxy, the resource caching and the load balancing. Nginx and apache HTTPD will be used as web server and reverse proxy, and to illustrate some caching features we will also present varnish a powerful caching server. To introduce load balancers we will compare between Nginx and Haproxy.

reverse proxycachevarnish
Александр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArtАлександр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArt

This document discusses HTTP caching tips and tricks. It explains that caching can decrease traffic, increase loading speed, require less code, and allow offline use. It provides code to enable caching and describes headers for content validation, cache checking, and cache management. These techniques can help optimize performance by leveraging cached responses when possible.

Gunicorn Nginx 
DB FS
Gunicorn Nginx 
DB FS
Gunicorn Nginx 
DB FS
Gunicorn Nginx 
DB FS

Recommended for you

Tools used for debugging
Tools used for debuggingTools used for debugging
Tools used for debugging

This document discusses various debugging tools for Linux systems including ldd, strace, ltrace, and GDB. Ldd displays shared library dependencies, strace and ltrace trace system calls and library functions respectively, and GDB is the GNU debugger that allows setting breakpoints and examining processes. The document encourages writing code as cleverly as possible since debugging is harder than writing code, and provides tips on configuring and using these debugging tools.

gdblddltrace
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern Web

An overview of the history, current state of NGINX and NGINX Plus as well as an overview of the industry we see changing today.

citrixnginxsite reliability
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...

(Presented by New Relic) Too often, developers think of a mobile app as simply code running on the device. A mobile app is much more than that. Every web API used by an app becomes as much a part of the app as the code running on the device. But while mobile developers have control over their code, they don't always have control over the APIs they use. Web APIs and their infrastructure impact app performance and ultimately the user experience. This presentation covers some of the essential aspects of app performance management when web APIs are present, including: -HTTP headers are your friend--stop ignoring all they have to tell you -Control your network connections on the device—don't just leave things to the OS -Configure all your caches and use them -Whatever you do, measure early and often The session includes a customer story from the CTO of Mirego, and demos of New Relic mobile app performance monitoring, where you see how to drill down into specific requests to see performance by response time, throughput, and data transfer size.

mobilestartupsapp
Gunicorn Nginx 
DB FS
Gunicorn Nginx 
DB FS
Gunicorn Nginx 
DB FS
Gunicorn Nginx 
DB FS

Recommended for you

Rate Limiting with NGINX and NGINX Plus
Rate Limiting with NGINX and NGINX PlusRate Limiting with NGINX and NGINX Plus
Rate Limiting with NGINX and NGINX Plus

On-demand recording: https://www.nginx.com/resources/webinars/rate-limiting-nginx/ Learn how to mitigate DDoS and password-guessing attacks by limiting the number of HTTP requests a user can make in a given period of time. This webinar will teach you how to: * How to protect application servers from being overwhelmed with request limits * About the burst and no‑delay features for minimizing delay while handling large bursts of user requests * How to use the map and geo blocks to impose different rate limits on different HTTP user requests * About using the limit_req_log_level directive to set logging levels for rate‑limiting events About the webinar A delay of even a few seconds for a screen to render is interpreted by many users as a breakdown in the experience. There are many reasons for these breakdowns in the user experience, one of which is DDoS attacks which tie up your system’s resources. Rate limiting is a powerful feature of NGINX that can mitigate DDoS attacks, which would otherwise overload your servers and hinder application performance. In this webinar, we’ll cover basic concepts as well as advanced configuration. We will finish with a live demo that shows NGINX rate limiting in action.

nginx plushttprate limiting
Getting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and HowGetting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and How

View CDN performance data, learn how you can collect data on CDN performance and get tips on improving CDN performance.

cdnspeedweb performance
Ruby Postgres
Ruby PostgresRuby Postgres
Ruby Postgres

This document summarizes the differences between the ruby-postgres and postgres-pr PostgreSQL database adapters for ActiveRecord in Ruby. It notes that postgres-pr is pure Ruby while ruby-postgres uses the libpq C library. It provides examples showing that postgres-pr is missing some functionality that ruby-postgres has like ParameterStatus support and asynchronous query execution. It concludes that while postgres-pr is useful, it has limitations that may prevent ActiveRecord from working properly, so ruby-postgres is likely better supported.

“The key to making programs fast 
is to make them 
do practically nothing” 
-- Mike Haertel (Author of GNU grep)
The Solution:
Gunicorn Nginx 
DB FS
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache;

Recommended for you

Scaling WordPress
Scaling WordPressScaling WordPress
Scaling WordPress

This document discusses optimizing a WordPress site to handle high traffic loads. It provides tips for caching at various levels (opcode, object, page, fragment) using tools like Nginx, PHP-FPM, memcached. It also recommends using a CDN, handling traffic variability, and scaling to multiple application servers with a load balancer. Benchmark results show performance improving from serving 50k pages/day to over 8k requests/second after these optimizations.

wordpressweb developmentscaling
Eduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhereEduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhere

The document describes Monkey, an open source HTTP server. It aims to be lightweight, fast, flexible and community-oriented while supporting embedded systems. Key features include HTTP/1.1, asynchronous sockets, Linux kernel support, multiple hardware architectures, and an indented configuration format. It uses a multi-layered architecture with worker threads for scheduling connections and tracking time. Plugins add functionality for logging, security, SSL, websockets and more. Benchmarks show it uses less memory than Nginx, Cherokee and Apache. Future plans include FastCGI, NoSQL support, URL rewriting and improved documentation. The project encourages community involvement through beta testing, artwork, documentation and coding.

startechconf
Zend Con 2008 Slides
Zend Con 2008 SlidesZend Con 2008 Slides
Zend Con 2008 Slides

The document discusses various techniques for scaling PHP applications, including: 1. Using load balancers to distribute traffic across multiple servers and ensure high availability. 2. Implementing session persistence to maintain user sessions as clients are load balanced. 3. Separating static and dynamic content to improve performance by serving static files from optimized servers. 4. Caching frequently accessed data and generated pages to reduce database queries. 5. Database replication and other techniques for scaling the application database infrastructure. 6. Code optimization methods like opcode caching and acceleration. 7. Design considerations like modularity when planning for scalability.

zendcon08
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache; 
proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y 
keys_zone=nginx_cache:40m;
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache; 
proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y 
keys_zone=nginx_cache:40m; 
proxy_temp_path /data/nginx-cache-temp 1 2;
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache; 
proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y 
keys_zone=nginx_cache:40m; 
proxy_temp_path /data/nginx-cache-temp 1 2; 
proxy_cache_key "$scheme://$host$request_uri";
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache; 
proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y 
keys_zone=nginx_cache:40m; 
proxy_temp_path /data/nginx-cache-temp 1 2; 
proxy_cache_key "$scheme://$host$request_uri"; 
proxy_cache_valid 200 6M;

Recommended for you

How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...

This document discusses monitoring microservices running in containers at scale. Some key points: 1) Containers introduce additional complexity for monitoring due to their dynamic nature - the average host runs 8 containers and each container only runs for 2 days on average. 2) Traditional VM-based monitoring agents can't monitor inside containers so monitoring must be done from outside the containers, like monitoring remote hosts. 3) Orchestration platforms like Kubernetes add labels to collected metrics to provide context on nodes, pods, services and more. 4) The large number of short-lived containers results in high metric series churn that must be addressed to avoid exploding storage requirements. Dimensional labeling and partitioning metrics by time help

micro-servicesdevops exchangedevops
WordPress Performance Tuning
WordPress Performance TuningWordPress Performance Tuning
WordPress Performance Tuning

Slides for my talk at BCN WordCamp 2016. Improve the performance of WordPress installations by using the right tool at every corresponding level in the technology stack.

wordpresswpwp-cli
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX

On-Demand Recording: https://www.nginx.com/resources/webinars/high-availability-content-caching-nginx/ You trust NGINX to be your web server, but did you know it’s also a high-performance content cache? In fact, the world’s most popular CDNs – CloudFlare, MaxCDN, and Level 3 among them – are built on top of the open source NGINX software. NGINX content caching can drastically improve the performance of your applications. We’ll start with basic configuration, then move on to advanced concepts and best practices for architecting high availability and capacity in your application infrastructure. Join this webinar to: * Enable content caching with the key configuration directives * Use micro caching with NGINX Plus to cache dynamic content while maintaining low CPU utilization * Partition your cache across multiple servers for high availability and increased capacity * Log transactions and troubleshoot your NGINX content cache

content cachingnginxnginx plus
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache; 
proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y 
keys_zone=nginx_cache:40m; 
proxy_temp_path /data/nginx-cache-temp 1 2; 
proxy_cache_key "$scheme://$host$request_uri"; 
proxy_cache_valid 200 6M; 
proxy_ignore_headers Cache-Control; 
proxy_ignore_headers Set-Cookie; 
proxy_hide_header Set-Cookie;
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache; 
proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y 
keys_zone=nginx_cache:40m; 
proxy_temp_path /data/nginx-cache-temp 1 2; 
proxy_cache_key "$scheme://$host$request_uri"; 
proxy_cache_valid 200 6M; 
proxy_ignore_headers Cache-Control; 
proxy_ignore_headers Set-Cookie; 
proxy_hide_header Set-Cookie; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
proxy_set_header X-Real-IP $remote_addr; 
proxy_set_header Host $http_host;
Nginx Reverse Proxy Cache Config 
proxy_cache nginx_cache; 
proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y 
keys_zone=nginx_cache:40m; 
proxy_temp_path /data/nginx-cache-temp 1 2; 
proxy_cache_key "$scheme://$host$request_uri"; 
proxy_cache_valid 200 6M; 
proxy_ignore_headers Cache-Control; 
proxy_ignore_headers Set-Cookie; 
proxy_hide_header Set-Cookie; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
proxy_set_header X-Real-IP $remote_addr; 
proxy_set_header Host $http_host; 
add_header X-Cached $upstream_cache_status;
The result:

Recommended for you

WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine

Whether for speed, security or scalability, a WordPress site can be improved using NGINX. View full webinar on-demand at: http://nginx.com/resources/webinars/taste-nginx-conf-wordpress-nginx-best-practices-easyengine/

rahul bansalnginxwebserver
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new

The document provides guidelines for deploying an L.N.M.P environment on a 64-bit server. It specifies directory locations for source code, installed software, scripts and logs. It also outlines steps to update the system, install and configure MySQL, Nginx, PHP and other packages, including compiling Nginx with specific modules and options, setting Nginx as a service, and enabling syntax highlighting for Nginx configuration files.

10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS

This document provides tips and best practices for optimizing a WordPress site hosted on a VPS. It recommends switching from the default PHP implementation to PHP-FPM to improve performance. It also recommends replacing the default web server with Nginx, and describes various Nginx configuration options to optimize caching, compression, and resource usage. These include enabling OPcache and using Nginx as a reverse proxy for caching and serving static files. The document also covers using Nginx fastcgi caching to cache dynamic PHP pages from WordPress for better performance.

nginxwordpressphp performance
-62% 
Response time
Your site is fast!
Thank you for listening! 
Anton Pirker 
anton@ignaz.at 
@antonpirker 
Slides 
http://goo.gl/pGXlkD 
Blog post 
http://anton-pirker.at/boosting-djangos-performance-with- 
nginx-reverse-proxy-cache/

More Related Content

What's hot

Clug 2012 March web server optimisation
Clug 2012 March   web server optimisationClug 2012 March   web server optimisation
Clug 2012 March web server optimisation
grooverdan
 
ITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content CachingITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content Caching
Ortus Solutions, Corp
 
Server architecture
Server architectureServer architecture
Server architecture
Masters Academy
 
To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)
Geoffrey Anderson
 
Genkidama:実装と課題
Genkidama:実装と課題Genkidama:実装と課題
Genkidama:実装と課題
Takuya ASADA
 
Backing up thousands of containers
Backing up thousands of containersBacking up thousands of containers
Backing up thousands of containers
Marian Marinov
 
04 web optimization
04 web optimization04 web optimization
04 web optimization
Nguyen Duc Phu
 
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishReverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and Varnish
El Mahdi Benzekri
 
Александр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArtАлександр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArt
Alina Vilk
 
Tools used for debugging
Tools used for debuggingTools used for debugging
Tools used for debugging
Marian Marinov
 
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern Web
Kevin Jones
 
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
Amazon Web Services
 
Rate Limiting with NGINX and NGINX Plus
Rate Limiting with NGINX and NGINX PlusRate Limiting with NGINX and NGINX Plus
Rate Limiting with NGINX and NGINX Plus
NGINX, Inc.
 
Getting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and HowGetting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and How
Aaron Peters
 
Ruby Postgres
Ruby PostgresRuby Postgres
Ruby Postgres
Akio Ishida
 
Scaling WordPress
Scaling WordPressScaling WordPress
Scaling WordPress
Mark Jaquith
 
Eduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhereEduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhere
StarTech Conference
 
Zend Con 2008 Slides
Zend Con 2008 SlidesZend Con 2008 Slides
Zend Con 2008 Slides
mkherlakian
 
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
Outlyer
 
WordPress Performance Tuning
WordPress Performance TuningWordPress Performance Tuning
WordPress Performance Tuning
Javier Arturo Rodríguez
 

What's hot (20)

Clug 2012 March web server optimisation
Clug 2012 March   web server optimisationClug 2012 March   web server optimisation
Clug 2012 March web server optimisation
 
ITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content CachingITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content Caching
 
Server architecture
Server architectureServer architecture
Server architecture
 
To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)To Hire, or to train, that is the question (Percona Live 2014)
To Hire, or to train, that is the question (Percona Live 2014)
 
Genkidama:実装と課題
Genkidama:実装と課題Genkidama:実装と課題
Genkidama:実装と課題
 
Backing up thousands of containers
Backing up thousands of containersBacking up thousands of containers
Backing up thousands of containers
 
04 web optimization
04 web optimization04 web optimization
04 web optimization
 
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishReverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and Varnish
 
Александр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArtАлександр Сергиенко, Senior Android Developer, DataArt
Александр Сергиенко, Senior Android Developer, DataArt
 
Tools used for debugging
Tools used for debuggingTools used for debugging
Tools used for debugging
 
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern Web
 
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...Mobile App Performance:  Getting the Most from APIs (MBL203) | AWS re:Invent ...
Mobile App Performance: Getting the Most from APIs (MBL203) | AWS re:Invent ...
 
Rate Limiting with NGINX and NGINX Plus
Rate Limiting with NGINX and NGINX PlusRate Limiting with NGINX and NGINX Plus
Rate Limiting with NGINX and NGINX Plus
 
Getting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and HowGetting a Grip on CDN Performance - Why and How
Getting a Grip on CDN Performance - Why and How
 
Ruby Postgres
Ruby PostgresRuby Postgres
Ruby Postgres
 
Scaling WordPress
Scaling WordPressScaling WordPress
Scaling WordPress
 
Eduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhereEduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhere
 
Zend Con 2008 Slides
Zend Con 2008 SlidesZend Con 2008 Slides
Zend Con 2008 Slides
 
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
 
WordPress Performance Tuning
WordPress Performance TuningWordPress Performance Tuning
WordPress Performance Tuning
 

Similar to Django and Nginx reverse proxy cache

High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
NGINX, Inc.
 
WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
NGINX, Inc.
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
Yiwei Ma
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
Paolo Tonin
 
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios
 
Wckansai 2014
Wckansai 2014Wckansai 2014
Wckansai 2014
Wataru OKAMOTO
 
Less and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersLess and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developers
Seravo
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
Antons Kranga
 
Using NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content CacheUsing NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content Cache
Kevin Jones
 
Docker for mac & local developer environment optimization
Docker for mac & local developer environment optimizationDocker for mac & local developer environment optimization
Docker for mac & local developer environment optimization
Radek Baczynski
 
Content Caching with NGINX and NGINX Plus
Content Caching with NGINX and NGINX PlusContent Caching with NGINX and NGINX Plus
Content Caching with NGINX and NGINX Plus
Kevin Jones
 
Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!
Jeff Jones
 
PHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on NginxPHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on Nginx
Harald Zeitlhofer
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
Michele Orselli
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
yiditushe
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
Otto Kekäläinen
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
Dana Luther
 
Nginx pres
Nginx presNginx pres
Nginx pres
James Fuller
 

Similar to Django and Nginx reverse proxy cache (20)

High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
 
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
 
Wckansai 2014
Wckansai 2014Wckansai 2014
Wckansai 2014
 
Less and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersLess and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developers
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
 
Using NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content CacheUsing NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content Cache
 
Docker for mac & local developer environment optimization
Docker for mac & local developer environment optimizationDocker for mac & local developer environment optimization
Docker for mac & local developer environment optimization
 
Content Caching with NGINX and NGINX Plus
Content Caching with NGINX and NGINX PlusContent Caching with NGINX and NGINX Plus
Content Caching with NGINX and NGINX Plus
 
Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!
 
PHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on NginxPHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on Nginx
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
Nginx pres
Nginx presNginx pres
Nginx pres
 

Recently uploaded

Lincoln University degree offer diploma Transcript
Lincoln University degree offer diploma TranscriptLincoln University degree offer diploma Transcript
Lincoln University degree offer diploma Transcript
ubufe
 
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
taqyea
 
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
taqyea
 
一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理
taqyea
 
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
ffg01100
 
Corporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptxCorporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptx
byubyu7
 
University of Otago degree offer diploma Transcript
University of Otago degree offer diploma TranscriptUniversity of Otago degree offer diploma Transcript
University of Otago degree offer diploma Transcript
ubufe
 
一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理
一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理
一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理
taqyea
 
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
taqyea
 
About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...
Erkinjon Erkinov
 
cyber-security-training-presentation-q320.ppt
cyber-security-training-presentation-q320.pptcyber-security-training-presentation-q320.ppt
cyber-security-training-presentation-q320.ppt
LiamOConnor52
 
一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理
一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理
一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理
taqyea
 
2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage
Zsolt Nemeth
 
very nice project on internet class 10.pptx
very nice project on internet class 10.pptxvery nice project on internet class 10.pptx
very nice project on internet class 10.pptx
bazukagaming6
 
seo proposal | Kiyado Innovations LLP pdf
seo proposal | Kiyado Innovations LLP  pdfseo proposal | Kiyado Innovations LLP  pdf
seo proposal | Kiyado Innovations LLP pdf
diyakiyado
 
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
taqyea
 
How to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer ExperienceHow to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer Experience
Serva AppLabs
 
Future Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on WebsitesFuture Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on Websites
Serva AppLabs
 
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
taqyea
 
Steps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a companySteps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a company
sivaraman163206
 

Recently uploaded (20)

Lincoln University degree offer diploma Transcript
Lincoln University degree offer diploma TranscriptLincoln University degree offer diploma Transcript
Lincoln University degree offer diploma Transcript
 
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
 
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
 
一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理
 
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
202254.com全网最高清影视香蕉影视,热门电影推荐,热门电视剧在线观看,免费电影,电影在线,在线观看。球华人在线電視劇,免费点播,免费提供最新高清的...
 
Corporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptxCorporate Minimal Newspaper Headline Style Newsletter.pptx
Corporate Minimal Newspaper Headline Style Newsletter.pptx
 
University of Otago degree offer diploma Transcript
University of Otago degree offer diploma TranscriptUniversity of Otago degree offer diploma Transcript
University of Otago degree offer diploma Transcript
 
一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理
一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理
一比一原版(hull毕业证书)英国赫尔大学毕业证如何办理
 
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
 
About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...
 
cyber-security-training-presentation-q320.ppt
cyber-security-training-presentation-q320.pptcyber-security-training-presentation-q320.ppt
cyber-security-training-presentation-q320.ppt
 
一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理
一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理
一比一原版(bu毕业证书)英国伯恩茅斯大学毕业证如何办理
 
2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage2023. Archive - Gigabajtos selfpublisher homepage
2023. Archive - Gigabajtos selfpublisher homepage
 
very nice project on internet class 10.pptx
very nice project on internet class 10.pptxvery nice project on internet class 10.pptx
very nice project on internet class 10.pptx
 
seo proposal | Kiyado Innovations LLP pdf
seo proposal | Kiyado Innovations LLP  pdfseo proposal | Kiyado Innovations LLP  pdf
seo proposal | Kiyado Innovations LLP pdf
 
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
 
How to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer ExperienceHow to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer Experience
 
Future Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on WebsitesFuture Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on Websites
 
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
 
Steps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a companySteps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a company
 

Django and Nginx reverse proxy cache

  • 1. Boosting Django Performance with the Nginx Reverse Proxy Cache (I need to find better titles…)
  • 2. Your site is lame!
  • 17. “The key to making programs fast is to make them do practically nothing” -- Mike Haertel (Author of GNU grep)
  • 20. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache;
  • 21. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache; proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y keys_zone=nginx_cache:40m;
  • 22. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache; proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y keys_zone=nginx_cache:40m; proxy_temp_path /data/nginx-cache-temp 1 2;
  • 23. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache; proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y keys_zone=nginx_cache:40m; proxy_temp_path /data/nginx-cache-temp 1 2; proxy_cache_key "$scheme://$host$request_uri";
  • 24. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache; proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y keys_zone=nginx_cache:40m; proxy_temp_path /data/nginx-cache-temp 1 2; proxy_cache_key "$scheme://$host$request_uri"; proxy_cache_valid 200 6M;
  • 25. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache; proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y keys_zone=nginx_cache:40m; proxy_temp_path /data/nginx-cache-temp 1 2; proxy_cache_key "$scheme://$host$request_uri"; proxy_cache_valid 200 6M; proxy_ignore_headers Cache-Control; proxy_ignore_headers Set-Cookie; proxy_hide_header Set-Cookie;
  • 26. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache; proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y keys_zone=nginx_cache:40m; proxy_temp_path /data/nginx-cache-temp 1 2; proxy_cache_key "$scheme://$host$request_uri"; proxy_cache_valid 200 6M; proxy_ignore_headers Cache-Control; proxy_ignore_headers Set-Cookie; proxy_hide_header Set-Cookie; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host;
  • 27. Nginx Reverse Proxy Cache Config proxy_cache nginx_cache; proxy_cache_path /data/nginx-cache levels=1:2 max_size=10g inactive=1y keys_zone=nginx_cache:40m; proxy_temp_path /data/nginx-cache-temp 1 2; proxy_cache_key "$scheme://$host$request_uri"; proxy_cache_valid 200 6M; proxy_ignore_headers Cache-Control; proxy_ignore_headers Set-Cookie; proxy_hide_header Set-Cookie; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; add_header X-Cached $upstream_cache_status;
  • 30. Your site is fast!
  • 31. Thank you for listening! Anton Pirker anton@ignaz.at @antonpirker Slides http://goo.gl/pGXlkD Blog post http://anton-pirker.at/boosting-djangos-performance-with- nginx-reverse-proxy-cache/