Live data from Hacker News

The Architecture of Schemaless, Uber Engineering’s Trip Datastore Using MySQL

eng.uber.com

1–10 of 22 posts

Re: The Architecture of Schemaless, Uber Engineering’s Trip Datastore Using MySQL

#5
post #4

Anyone want to weigh in on whether or not Postgres is a viable option for this?

Might be a case of MySQL natively supporting multi-master replication, whereas with Postgres you have to use a third-party/commercial solution.

Especially if you're not using any particularly advanced Postgres features, the operational simplicity of having built-in multimaster replication might outweigh any PG benefits.

Re: The Architecture of Schemaless, Uber Engineering’s Trip Datastore Using MySQL

#6
post #4

Anyone want to weigh in on whether or not Postgres is a viable option for this?

Only semi-related, I've discerned a Postgres > MySQL/MariaDB sentiment on HN for the last year or so. Is that just my imagination? If not, why is that? MySQL in my experience is a very powerful RDBMS, maybe I just haven't run up against its limitations.

Re: The Architecture of Schemaless, Uber Engineering’s Trip Datastore Using MySQL

#7
post #4

Anyone want to weigh in on whether or not Postgres is a viable option for this?

This may be relevant:

"I'm hearing a lot about how Uber uses MySQL at web scale but not about their migration away from PostgreSQL." https://twitter.com/xaprb/status/688149033991340033

Re: The Architecture of Schemaless, Uber Engineering’s Trip Datastore Using MySQL

#8
post #4

Anyone want to weigh in on whether or not Postgres is a viable option for this?

Part 1 of the article said: "Our new solution needed to be able to linearly add capacity by adding more servers, a property our Postgres setup lacked."

From that, I think we can presume that it was more straightforward to go with MySQL multimaster replication rather than the 3rd-party solutions required for PostGreSQL which are not as mature.

Re: The Architecture of Schemaless, Uber Engineering’s Trip Datastore Using MySQL

#9
post #4

Anyone want to weigh in on whether or not Postgres is a viable option for this?

Can you please stop? Postgres is great and all. But people use MySQL for valid reasons, web scale is one. And InnoDB is a very very good DB engine for that task.

Re: The Architecture of Schemaless, Uber Engineering’s Trip Datastore Using MySQL

#10
post #6
post #4

Anyone want to weigh in on whether or not Postgres is a viable option for this?

Only semi-related, I've discerned a Postgres > MySQL/MariaDB sentiment on HN for the last year or so. Is that just my imagination? If not, why is that? MySQL in my experience is a very powerful RDBMS, maybe I just haven't run up against its limitations.

There's probably a couple reasons, but I'll summarize my experiences with them.

I haven't dug into MySQL for a few years (last I really worked with it was 5.5), but out of the box, it does a lot of things that are pretty unsafe or encourage bad practices, such as truncating data when it's longer than the column size, inserting the zero-value for a NOT NULL column rather than erroring when a NULL is inserted, confusing timestamp column behavior, no DDL-level transactionality, etc. Additionally, and not necessarily a bad thing, but it has made some odd implementation and feature decisions that can be (IMHO) counter-intuitive or have a large impact, particularly with regards to how foreign keys get implemented, but also with things like not having schemas (database > tables, rather than database > schemas > tables), not having a boolean type, its datatype specification (int(1) means an integer that displays only a single digit, rather than denoting storage sizes), or the fact that every ALTER TABLE causes a complete on-disk table rewrite.

PostgreSQL, on the other hand, makes every attempt to keep 100% data integrity at all times, has a lot of killer features (probably the best date/time math implementation I've ever used, typesafe operators, etc), is generally very extensible, and most importantly, is extremely predictable. True, it doesn't have the same scalability features out of the box that MySQL does, but that's getting better every release, and as mentioned elsewhere, there's plenty of adequate third-party tooling available (e.g. Slony).

I think MySQL is very much so the PHP of the RDBMS world - it does a lot of silly stupid stuff - mostly for historical reasons - but in the hands of someone who knows how to use it properly, it can be an extremely useful tool. Postgres just defaults to being an extremely useful tool out of the box without needing to know all the gotchas that come with it.

Post reply on HN