Michael J. Radwin

Tales of a software engineer who keeps kosher and hates the web.

Currently Viewing Posts in Apache

Hacking Apache HTTP Server at Yahoo!

apache-feather.gif Tomorrow, I’ll be giving a talk entitled Hacking Apache HTTP Server at Yahoo!

Since 1996, Yahoo has been running Apache HTTP Server on thousands of servers and serving billions of requests a day. This session reveals the secrets of how Yahoo gets maximum performance out of minimal hardware by tweaking configuration directives and hacking the source code. Radwin will cover topics such as reducing bandwidth costs, extensible logfile format and rotation schemes, dumping core gracefully, and how to avoid the dreaded MaxClients, Max/MinSpareServers, StartServers configuration nightmare.

I love this topic. This is by far the most fun I have ever had preparing for a presentation. It’s a privilege to be able to speak to such a savvy audience. I only wish I had more than 60 minutes. 🙂

HTTP Caching and Cache-busting for Content Publishers

oscon-logo.gif Slides are now online (HTML, PPT) for today’s talk on HTTP Caching and Cache-busting for Content Publishers.

Abstract: A user’s web experience can often be improved by the proper use of HTTP caches. Radwin discusses when to use and when to avoid caching, and how to employ cache-busting techniques most effectively. Radwin also explains the top 5 caching ad cache-busting techniques for large content publishers.

Schlossnagle on PHP vs Java

php-logo.gif If you work in the Internet biz, read George’s post Why PHP Scales – A Cranky, Snarky Answer. It’s worth 10 minutes, and the crankiness level is a lot lower than the title would lead you to expect.

He’s right that Java is actually faster than PHP because Java is a compiled language and PHP is not. And he’s right that it really doesn’t matter 99.9% of the time.

Advanced PHP Programming

Advanced PHP Programming I just got a copy of Advanced PHP Programming by George Schlossnagle. It’s the first good book published for PHP5, and an excellent read even for folks who are still using PHP4.

The book isn’t just about PHP. It covers many aspects of the development process used to produce a robust, fast, maintainable website. George covers a range of topics you won’t frequently find in a typical PHP book. For example, in Chapter 7 he spends a couple of pages discussing the different techniques for distributing files from your development environment into your production environment. He spends a large portion of the book discussing regression and unit testing, load testing and profiling/benchmarking. This isn’t an ordinary PHP book.

The last hundred pages of the book are for really advanced users. George covers the PHP extension APIs in more detail than the online documentation at php.net. You’ve gotta be a C/C++ hacker to appreciate this stuff.

My only possible complaint about the book is that it’s a little OO-centric. Most of the examples George presents use classes to provide some organization of data and grouping of functionality. His use of OO is a lot more palatable to me than the huge object hierarchies you find in some projects. I’ve never understood why people want something like log4php which adds 10k LOC to your application and adds little value over the built-in syslog().

HTTP Caching and Cache-busting

oscon-logo.gif I have been invited to speak about HTTP caching and cache-busting at the O’Reilly Open Source Convention in July 2004.

Abstract of my talk:

A user’s web experience can often be improved by the proper use of HTTP caches. This talk discusses when to use and when to avoid caching, how to employ cache-busting techniques most effectively, and how to diagnose problems with caches.

In particular, this talk will cover:

  1. Overview of HTTP caches
    • Shared caches vs. private caches
    • Proxy caches and HTTP server accelerators
  2. How to encourage caching for static content
    • Reduction of network bandwidth usage
    • Improved browsing and page-rendering speed by avoiding network round-trips
  3. How to discourage caching for personalized or frequently-changing content
  4. How to disable caching for sensitive content
    • Cache-busting for accurate hit-metering and advertising statistics
    • Cache-busting for sensitive information (e.g. personal financial data)
  5. “Expires” vs. “Cache-Control” and other HTTP headers
  6. The best of all worlds: unique URL tagging techniques that defeat proxy caches but work gracefully with browser caches
  7. Sending HTTP headers
    • Apache’s mod_headers and mod_expires modules
    • PHP’s header() and mod_perl’s $r->header_out() functions
    • Using HTML <meta> tags
  8. Debugging HTTP caching problems
    • Using the Web Developer and Live HTTP Headers extensions for Mozilla
    • Diagnosing MSIE with Ethereal
    • Text-based debugging
    • Rolling your own HTTP proxy

Hope to see you there.

Attending PHPCon West 2003

I’m at PHPCon West 2003 this week.

I didn’t make it to the Code Sprint today, but Andrei was leading one of the sections, so I’ll get the skinny from him. I really dig the idea — get programmers to pay for the opportunity to contribute their brainpower to an Open Source project.