AlgoViz

Memcached or Redis

easy 25 min

Memcached and Redis both keep data in memory and answer in well under a millisecond on the server.

Where it shows up

The same pattern appears across everyday software.

  • Web page caching at LiveJournal

    Memcached was first written there in 2003, to keep the same database work from being repeated for every page.

  • Facebook's Memcached tier

    A 2013 USENIX paper describes how Facebook built a large distributed key-value store out of Memcached servers.

  • Netflix EVCache

    An open source Memcached-based cache that writes to several zones and reads from the local one, adding copies that the server itself does not have.

  • Game leaderboards

    A Redis sorted set keeps players in score order, so a rank is one command.

  • Rate limiting

    A counter per user and minute in Redis, with its expiry set in the same script, limits callers across many app servers.

  • Managed services

    Cloud providers sell hosted Memcached and Redis-compatible caches, so teams choose by features and not by who can install it.