Facebook's original database architecture was built using MySQL as the persistent database and memcache as a "lookaside" cache, but this proved to be unsuitable for the company's growing user base. In response, Facebook developed TAO, a custom NoSQL graph API built on top of sharded MySQL, which solved many of the problems faced by the company, including data consistency issues and loss of developer agility. However, this approach required significant engineering effort and led to a loss of flexibility for developers. Meanwhile, Google was building Spanner, an entirely new SQL database that could horizontally scale, geo-replicate, and tolerate infrastructure failures. Unlike TAO, Spanner uses per-shard distributed consensus to ensure high availability in the presence of failures. Today, companies like YugabyteDB are building on top of the Spanner architecture to bring similar benefits to enterprises, including developer agility, global data distribution, and extreme resilience against failures.