Single-server Level of Memcache

Learn what problems we can solve at the single server level of Memcache.

Introduction to the single server level

We'll improve certain aspects of Memcached by modifying its internal mechanisms for a single server. Memcached uses four main data structures to form a key-value store:

  1. A Hash table

  2. A Cache item data structure

  3. A Slab allocator

  4. A Least Recently Used (LRU) list

Hashtable with separate chaining

The hashtable uses hash functions to look up items using the key quickly. As illustrated below, the hashtable is an array of buckets, where each bucket is a linked list.

Access this course and 1400+ top-rated courses and projects.