background preloader

Web Caching/Accelerating/Proxy/Etc | Tech Topics

Facebook Twitter

Flask + Nginx + Gunicorn(on a Vagrant box) // Samrat Man Singh. A Primer on Web Caching - Thomas Hunter - Web Development Tutorials and Personal Opinions. A lot of this article will apply to any network based application, but since I’m a web developer, I’m going to put a web spin on things. Also, I couldn’t help but get into compression a little while discussing browser caching. Caching is a vital part of any high traffic web app, especially ones which send a lot of data over the wire. I don’t just mean communication between the browser and the web server, but really any traffic over the local network, or even traffic between different services on the same machine. Network latency and disk I/O are the slowest things we can do on our machine, and we can sacrifice a little RAM to stop ourselves from doing it multiple times. In-Memory Data Caches Storing data in memory is the fastest way to retrieve it. There are several different in-memory caching tools depending on your environment.

Disk Caches Sometimes other operations can be so slow that caching data to disk is acceptable, such as grabbing a list of recent tweets over HTTP. <? Wordpress Performance Comparison: Using Nginx, Apache, APC and Varnish in Different Scenarios. Wordpress Performance Comparison: Using Nginx, Apache, APC and Varnish in Different Scenarios Written by Guillermo Garron .

Date: 2012-04-27 22:17:39 +0000 Introduction If you follow this blog, you may already know that I’m somehow obsessed with performance. But performance with low resources. I like to try to squeeze every drop of power from a server before upgrading it. Usually this is achievable tweaking configuration of the server. This time, I’ve been playing with Wordpress and a Small VPS server. 512 MB RAM Shared CPU Shared Disk Arch Linux 32 Bits It is the smallest Linode available by the time of this writing. I’ve tested Wordpress on different possible configurations: Apache, PHP, MySQL Standard Apache, PHP, MySQL and APC Nginx, PHP-FPM, MySQL Nginx, PHP-FPM, MySQL and APC Nginx, PHP-FPM, MySQL, APC and Varnish Apache, PHP, MySQL, APC and Varnish I’ve used the standard Wordpress installation, with no extra plugins installed, not even Total Cache or Super Cache. The tests The results Bio.

Memcached | Database. FastCGI | Web Server/Etc. Scaling/Big Data/Distributed/Etc | Technology Topics. Web Servers/Etc | Software/etc. Nginx | Web Servers.

PHP-FPM - PHP FastCGI Process Manager

APC - Alternative PHP Cache. List of PHP accelerators. This is a list of PHP accelerators. Alternative PHP Cache (APC)[edit] Alternative PHP Cache is a free, open source (PHP license) framework that caches the output of the PHP bytecode compiler in shared memory, thus reducing parsing and disk I/O overhead for later requests; and a shared memory cache for user data. For an application consisting of a large source code base such as Drupal, a 3x increase in page generation speed is possible as a result.[1] It has been used at Facebook and has a mature codebase thanks to numerous contributors, including Facebook itself.[2] APC was originally scheduled for inclusion into the PHP core no later than PHP 6.[3] While multiple accelerator projects were considered desirable,[4] the focus has since moved to Optimizer Plus[5][6] which is included in the core distribution as of PHP 5.5. eAccelerator[edit] eAccelerator was born in December 2004 as a fork of the Turck MMCache project.

IonCube PHP Accelerator[edit] Only supports PHP 4. Turck MMCache[edit] NGINX + PHP-FPM + APC = Awesome. The following guide will walk you through setting up possibly the fastest way to serve PHP known to man. If there is a faster way, I’ve not yet found it climbing through zillions of blog posts out there on the subject. In this article, we’ll be installing nginx http server, PHP with the PHP-FPM patches, as well as APC. The end result? Pure awesome. Some Background For the last 2+ years, we’ve been running Apache with mod_php at Massify . It’s a pretty well know fact by now that Nginx (pronounced engine-x, though I call it n-jinx) in typical scenarios outpaces Apache on all kinds of fronts: i/o, cpu, memory, reqs/sec. The typical nginx configuration involves using from the LightTPD project to get nginx serving up PHP. Enter PHP-FPM , which stands for PHP FastCGI Process Manager.

Note: Even if you are sticking with Apache, there are a variety of reasons to skip mod_php and go straight for PHP via FastCGI. Let’s Get Rocking We’re using a fresh install of Ubuntu 8.10 Intrepid. Compile PHP #! Caching/Etc | 37signals. Caching Tutorial for Web Authors and Webmasters. For Web Authors and Webmasters This is an informational document. Although technical in nature, it attempts to make the concepts involved understandable and applicable in real-world situations. Because of this, some aspects of the material are simplified or omitted, for the sake of clarity. If you are interested in the minutia of the subject, please explore the References and Further Information at the end. What’s a Web Cache? A Web cache sits between one or more Web servers (also known as origin servers) and a client or many clients, and watches requests come by, saving copies of the responses — like HTML pages, images and files (collectively known as representations) — for itself.

There are two main reasons that Web caches are used: To reduce latency — Because the request is satisfied from the cache (which is closer to the client) instead of the origin server, it takes less time for it to get the representation and display it. Kinds of Web Caches Browser Caches Proxy Caches Gateway Caches. Sort - Database/Caching/Storage/Search[?]/Etc.

Varnish Cache | Caching/Etc