Cross-regional Level of Memcache

Learn about the challenges and their solutions while scaling Memcache across data centers.

Introduction to the cross-regional level

At the regional level, latency was not a huge problem as the latencies inside a data center are around one millisecond, but as soon as we go to the cross-regional level, the latencies might go to around a 100 milliseconds. Due to this, and unlike in previous layers the CAP theorem comes in full effect and we have to choose between availability and consistency.

Cross-regional replication brings many benefits to our system:

  • Firstly, it reduces latency by allowing clients to communicate with local Memcached and database servers.

  • Secondly, it can mitigate the effects of natural disasters like earthquakes or hurricanes.

  • Thirdly, having vastly different geographical locations can have economic incentives like cheaper electricity or land.

Replication on this level poses a challenge in maintaining the consistency between the primary and secondary regions. ...