Caches and message queues have become fundamental building blocks for services under heavy load.

Using Memcached

Memcached combines free, idle RAM on server on which it is installed into a single, large least-recently used (LRU) cache. The actual procedure for using Memcached is designed to be simple.

Hashing And Sharding

When faced with several Memcached instances in a list, a Memcached client will shard the database by hashing each key’s string value and letting the hash determine which server in the Memcached cluster is used to store that particular key.

Message Queues

Message queue protocols let you send reliable chunks of data called messages instead of datagrams. The idea of datagram is specific to unreliable services where data can be lost, duplicated, or reordered by the underlying network. Typically, a message queue promises to transmit messages reliably and to deliver them automatically: a message either arrives whole and intact, or it does not arrive at all.

There are many possible uses to which message queues are put.

Each brand of message queue typically supports several topologies.