You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Previous episode Database bottlenecks: why more web servers can make a site slower

What happens when a website goes viral: how a site keeps up with millions of visitors

Caching: why the millionth visitor can be served faster than the first

Millions of visitors ask a website for the same thing. For each visitor, the database looks up the same answer again. One small change stops most of those requests before they reach the database.

  1. 1 Two million times, a server asks the database for today's puzzle, and two million times the database looks it up and sends back the very same puzzle. That puzzle changes once a day.databasetoday'spuzzle

    Two million times, a server asks the database for today's puzzle, and two million times the database looks it up and sends back the very same puzzle. That puzzle changes once a day.

  2. 2 You look at what your database did this morning: two million answers, all the same. Every lookup after the first one made an answer it had already made.youAgain?

    You look at what your database did this morning: two million answers, all the same. Every lookup after the first one made an answer it had already made.

The rest of this episode is for subscribers

Subscribe to read every premium episode. You can cancel when you want.

Paid yearly: $99 instead of $119.88

Next episode CDNs: how most requests to a website never reach its servers

Share this comic

More comics