0

We have recently switched to MySQL master/slave architecture. We do all writes and critical reads to master and all read to the slave machines. The master/slave architecture is designed as follows.

enter image description here

Now, if we cache data read from slave machines may have chances to create stale objects in Memcached due to delay in master => slave synching.

Temporarily, we have solved this problem by adding 5 min expiry while creating objects in Memcached. Assuming syncing will be done within 5 min. Now, even this 5 min delay is not acceptable to us.

Another way of solving this problem could be like Facebook solved by changing MySQL parser and carrying keys to the slave machine.

Is there any other way of solving this problem?

ssharma
  • 521
  • 1
  • 7
  • 17

0 Answers0