

#Postgres vs mysql uber series#
This is part one of a three-part series on Schemaless. Since that time, the architecture of Uber has changed significantly, to a model of microservices and new data platforms. The making of Schemaless, Uber Engineering’s custom designed datastore using MySQL, which has allowed us to scale from 2014 to beyond.

During peak traffic early on, our bandwidth to the storage web service simply wasn’t fast enough to keep up with the rate at which WALs were being written to it. Why Uber Engineering Switched from Postgres to MySQL J/ Global Introduction The early architecture of Uber consisted of a monolithic backend application written in Python that used Postgres for data persistence. Ive now changed that and when i need a database now, i reach for PostgreSQL. In addition to sending all of the WAL updates from West Coast to East Coast, we archived all WALs to a file storage web service, both for extra assurance that we could restore data in the event of a disaster and so that archived WALs could bring up new replicas from database snapshots. Ive been using MongoDB as my go to database for side projects for many years. This bandwidth problem also caused issues for us with WAL archival. We chose Postgres because it was operationally more reliable than MySQL and at the time the founders of company believed in the portability of SQL databases. Purchasing very high bandwidth cross-country links is expensive, and even in cases where money is not an issue it’s simply not possible to get a cross-country networking link with the same bandwidth as a local interconnect. However, the verbosity of the Postgres replication protocol can still cause an overwhelming amount of data for a database that uses a lot of indexes. Cascading replication limits the inter–data center bandwidth requirements to the amount of replication required between just the master and a single replica, even if there are many replicas in the second data center.
