Traffic Control in Apache Jed Reynolds Blog.Bitratchet.com Where in your web site do you need traffic control?

Slides:



Advertisements
Similar presentations
Optimizing Websites with YSlow Tom Lianza Co-Founder Wishlisting.com Tom Lianza Co-Founder Wishlisting.com.
Advertisements

PACS – 06/21/14 1 Cache? What is caching? A way to increase the average rate of a process by preferentially using a copy of data in a faster, closer, probably.
Getting to 2nd Base with your Content Delivery Network Mike Brittain Engineering Architect.
1 Content Delivery Networks iBAND2 May 24, 1999 Dave Farber CTO Sandpiper Networks, Inc.
1 Caching in HTTP Representation and Management of Data on the Internet.
DotSlash – A Web Hotspot Rescue System Weibin Zhao Henning Schulzrinne Department of Computer Science Columbia University June 11, 2004.
How the web works: HTTP and CGI explained
What’s a Web Cache? Why do people use them? Web cache location Web cache purpose There are two main reasons that Web cache are used:  to reduce latency.
Implementing ISA Server Caching. Caching Overview ISA Server supports caching as a way to improve the speed of retrieving information from the Internet.
Hypertext Transfer Protocol Information Systems 337 Prof. Harry Plantinga.
HTTP HyperText Transfer Protocol Part 3.
Nikolay Kostov Telerik Corporation
The Web Server Every web site (the collection of html/css files, data files, scripts and other files) must be stored on a web server The term web server.
Web Cache. Introduction what is web cache?  Introducing proxy servers at certain points in the network that serve in caching Web documents for faster.
Information-Centric Networks05a-1 Week 5 / Paper 1 On the use and performance of content distribution networks –Balachander Krishnamurthy, Craig Wills,
IST346:  Web Services. Today’s Agenda  Learn the basics of how the Web works  Understand various web service architectures  Address scaling, security,
Mark Phillip markphillip.com 200s, 304s, Expires Headers, HTTP Compression, And You.
A Scalable Content Distribution Service for Dynamic Web Content Seejo Sebastine Department of Computer Science University of Virginia.
E-insights, LLC © 2000 All rights reserved. Understanding Web Traffic Michael Whelan part - 2.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
On the Use and Performance of Content Distribution Networks Balachander Krishnamurthy Craig Wills Yin Zhang Presenter: Wei Zhang CSE Department of Lehigh.
1 Caching  Temporary storage of frequently accessed data (duplicating original data stored somewhere else)  Reduces access time/latency for clients 
Lighttpd & Modcache 2009/06/28. Basic lighttpd info Event-driven, single process Event-driven, single process Uses non-block io (network) + writev (memory)
1 3 Web Proxies Web Protocols and Practice. 2 Topics Web Protocols and Practice WEB PROXIES  Web Proxy Definition  Three of the Most Common Intermediaries.
1 HTTP Caching & Cache-Busting for Content Publishers Michael J. Radwin ApacheCon 2005 Wednesday, 14 December 2005.
HTTP Caching & Cache-Busting for Content Publishers Michael J. Radwin O’Reilly Open Source Convention July 28, 2004.
Krerk Piromsopa. Web Caching Krerk Piromsopa. Department of Computer Engineering. Chulalongkorn University.
HTTP Protocol Specification
Web Caching: Replication on the World Wide Web Jonathan Bulava CSC8530 – Distributed Systems Dr. Paul Schragger.
SIMPLE ROUTER The slide made by Salim Malakouti. Next we will create the Router  What do I we mean by a router?  Routers work similar to a map. It receives.
CSN09101 Networked Services Week 8: Essential Apache Module Leader: Dr Gordon Russell Lecturers: G. Russell, J. Jackson.
CSC 2720 Building Web Applications Getting and Setting HTTP Headers (With PHP Examples)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
1 Chapter 6: Proxy Server in Internet and Intranet Designs Designs That Include Proxy Server Essential Proxy Server Design Concepts Data Protection in.
ELFms meeting, 2/3/04 German Cancio, 2/3/04 Proxy servers in CERN-CC.
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG 11 Kigali, Rwanda May 2010 Dorcas Muthoni Courtesy: Hervey Allen.
Apache Traffic Redirection Jed Reynolds
DotSlash: Handling Web Hotspots at Dynamic Content Web Sites Weibin Zhao Henning Schulzrinne Department of Computer Science Columbia.
Web Server Design Week 4 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/03/10.
1 Caching in HTTP Representation and Management of Data on the Internet.
Module 9: Implementing Caching. Overview Caching Overview Configuring General Cache Properties Configuring Cache Rules Configuring Content Download Jobs.
HTTP support for caching & replication. Conditional requests Server executes conditional request. Responds with a message body only if the condition is.
1 Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG X Cairo, Egypt May 2009 Hervey Allen.
Web Cache Consistency. “Requirements of performance, availability, and disconnected operation require us to relax the goal of semantic transparency.”
Web Server Design Assignment #2: Conditionals & Persistence Due: 02/24/2010 Old Dominion University Department of Computer Science CS 495/595 Spring 2010.
On The Cooperation of Web Clients and Proxy Caches Yiu Fai Sit, Francis C.M. Lau, Cho-Li Wang Department of Computer Science The University of Hong Kong.
Web Technologies Lecture 1 The Internet and HTTP.
Front-end Performance. Why Performance? Users Download time JavaScript execution time Browser memory usage Search Engines Fast-loading pages are ranked.
A Faster FasterFox? David Backeberg and Remo Mueller.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
1 HTTP Caching & Cache-Busting for Content Publishers Michael J. Radwin ApacheCon 2004 November 17, 2004.
Web Cache. What is Cache? Cache is the storing of data temporarily to improve performance. Cache exist in a variety of areas such as your CPU, Hard Disk.
John S. Otto Mario A. Sánchez John P. Rula Fabián E. Bustamante Northwestern, EECS.
Web Server Design Week 5 Old Dominion University Department of Computer Science CS 495/595 Spring 2012 Michael L. Nelson 02/07/12.
Squid HTTP Proxy Henrik Nordström Open Source Consultant Squid developer.
Web Cacheability of CRLs David Groep, Jan 26 th, 2009.
Presented by Michael Rainey South Mississippi Linux Users Group
Understanding Solutions
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess
Redirection Allow requests to be moved about your file system or around the web ScriptAlias Allows you to run CGI scripts Simple to use.
HTTP request message: general format
Caching Temporary storage of frequently accessed data (duplicating original data stored somewhere else) Reduces access time/latency for clients Reduces.
Unix System Administration
1. Public Network - Each Rackspace Cloud Server has two networks
Web Caching? Web Caching:.
Internet Applications
Moodle Scalability What is Scalability?
Web Server Design Week 5 Old Dominion University
Web Server Design Week 4 Old Dominion University
Presentation transcript:

Traffic Control in Apache Jed Reynolds Blog.Bitratchet.com Where in your web site do you need traffic control?

Handling Traffic Efficiently Right and Wrong Traffic Reduce redundant traffic Eliminate unwanted traffic Protect your dynamic content Caching and tiered delivery

Spectrum of Traffic Control DNS Content Delivery Network (CDN) Proxies and load balancers Application v static content servers Application server File system and disk

Right Traffic: URI Stability The URLs our site has might be precious The location on disk might be moved 20,000 sub directories 10,000 files Google and Sitemaps

Redirects v Rewrites Redirect sends a HTTP header, Location: Rewrites are server or application configurations

Redirects with mod_alias Redirect permanent ^/xml/ < uri < header RedirectMatch permanent ^/xml/(.*)\.xml

Rewrites with mod_alias Alias /newspaper < uri /home/newspaper < disk AliasMatch /(newspaper)/(*\.htm) /home/$1/today/$2

Redirects with mod_rewrite RewriteCond HTTP_HOST ^(.*)\.news.org$ RewriteRule ^(.*)$ < uri < header [R=301,L] < rules

Rewrites with mod_rewrite RewriteRule /date/(.*) < uri /home/day/$1/index.htm < disk [L] < rule

Avoid Combinations Order of operations: 1) 2) 3), << rewrites 4), << aliases 5) << repeat the above order inside VH’s after global scope

Rewrite Scripts Might be easier to write Possible performance or memory concerns What can you best maintain?

Reducing Redundant Traffic with your Headers Cache-Control: max-age=3600, must- revalidate Expires: Fri, 30 Oct :19:41 GMT Last-Modified: Mon, 29 Jun :28:12 GMT ETag: "3e fbbc" Etags encourage freshest content Encourage client caching

Extend Expires with mod_expires ExpiresActive on ExpiresDefault "access plus 1 hour"

Disable Etags Mtime Inode File size Header unset Etag FileETag none

Encourage 304 responses Apache is good with file content File content is fast Scripts should detect If-Modified-Since Scripts should send 304 Not Modified PHP Cache_Lite

Banning Traffic with Order Allow,Deny Deny from

Banning Traffic with mod_rewrite RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot.* RewriteCond %{REMOTE_ADDR} ^123\.45\.67\.[8-9]$ RewriteRule ^/news/.+ < uri - < placeholder [F] < rule

Vastly More Traffic Multiple servers, but where? Load balancer mod_proxy HA Proxy Reverse Proxy Caching Squid CDNs

Thank you Jed Reynolds has been a programmer analyst since 1996 and enjoys bicycling and his Pentax K10D