Thanks
> using the JDBC™ protocol

JDBC is not a protocol, JDBC is an API, hence the need for a different JDBC driver per RDBMS. I doubt the author is a developer, I see this misunderstanding often with architects who don’t code.

The author is a "Chat GPT operator". Sadly, there is more and more such content hitting Hacker News.
Not gonna lie, was expecting something with more substance. Instead I feel I just read a quimera of LLM slop with a homework assignment of some marketing kid trying his/her best to meet the quota.
Tech blogs demonstrate quality of engineering of a company and this blog post is just doing that. Uber eng org is probably so bloated that nobody really cares about this stuff anymore.
  • duxup
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
I don’t get how this submission (and the identical one 17 days ago…) got upvotes, assuming anyone reads the article.

And no dup tag, flags?

Horrible stuff really, half-way through between explaining the basics of MySQL and somehow merging that slop that into describing the architecture they are apparently using (+/- hallucinations).
I'm not sure if it's just me, but it reads like a significant portion of this blog was written by a LLM.
Kinda does have that tone. Even the cover photo for the blog post has the classic AI generated look.
100% AI for the cover photo. If you look at their other blog posts it looks like Uber eng doesn't care. They use lazy AI generated images (not even decent attempts at it) for all blog post cover images.
"Cover Photo Attribution: The cover photo was generated using OpenAI ChatGPT Enterprise."
LLMs are basically trained to sound like mid-to-senior-mid-level Silicon Valley corporate blog-speak. It would not surprise me at all if Uber PR ran some this through some ghostwriting, I've seen that even at smaller places. Maybe it's even LLM-mediated now.
> At Uber, our MySQL®

> stateless services hosted in Kubernetes®

> using the JDBC™ protocol

> Percona™

> Cadence™

> Docker®

> Oracle InnoDB® engine within the mysqld process. We can configure this to use other MySQL engines like Meta RocksDB™.

Trademarks that obnoxious are off putting. The audience must not be engineers.

It also kind of reads as a “tldr but cool story bro” for engineers. Really looks like some paperwork had to be filled out.
Hey, how is Uber going to properly promote itself with only one article?

puts aluminum foil hat back on

Preface: not an american

Uber offshored some parts of their engineering so all the new-ish blogs fit the stereotypes. Lazy written, LLM generated, by their offshore indian folks.

Make of that what you want.

Without any proof you have resorted to some blatant racism. Sheesh
While I agree a subtle racist undertone is there, perhaps without intention (implying that all off-shored tasks will be done lazily), the more important part is that the article does really read like an LLM-generated slop (perhaps with some editing afterwards). Has all the typical 'markers', such as bloated text and overemphasized structure, etc. with the highlight for me personally being the "conclusion". It is so clear that the first paragraph was spit out by an LLM.
What part of that sentence is racist??
  • WJW
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
The bit with the implication that only offshore engineers would use LLMs to write blog posts, while the intellectually and morally superior engineers in the US would never stoop to such depths.

(Especially hilarious given it's Uber, which obviously could never have engineers doing anything morally dubious ever /s)

  • duxup
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
> only offshore engineers would use LLMs to write blog posts

I don’t see that implication in the original post.

  • cies
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
We use MySQL. Why? Well, it's hard to switch. And yes I believe Postgres is the better option, for us, and for almost anyone.

I was hoping to find some reason for Uber to use MySQL over the other popular FLOSS RDBMS (i.e.: Postgres).

For Facebook I more/less know what are their reasons. I was hoping to learn about Uber's reasons, but the article was was not going that deep.

Who signed off on this crap?
Why MySQL? Why not Postgres?
Famously covered in this, controversial blog: https://www.uber.com/en-AU/blog/postgres-to-mysql-migration/

Largely truth, some small mistakes. Generally friends don't let friends use Mysql but at scale all the hacks and workarounds actually work.

> Generally friends don't let friends use Mysql

What drives this sentiment?

Things that are missing in most other proper databases, like transactional DDL. If you don't mind not having them, Mysql is fine. It's probably better than Postgres for mostly read databases, which is most uses. There was a time when Mysql was by far the most used but over the years it's growth has been fairly slow and Postgres has kept growing in use, mainly due to functionality and integrity.

People say 'Facebook uses Mysql', but if a page fails, you just refresh. Most of the time the page is different so if everything is broken in the back end no one cares. Same with ad tracking (I have written code to check impressions via second sources).

If I refresh my bank balance I want to see the same. That's why they use Posgtges (yes the bank I worked on), or some commercial thing like SQLServer or Oracle, where integritry is more highly important.

> People say 'Facebook uses Mysql', but if a page fails, you just refresh. Most of the time the page is different so if everything is broken in the back end no one cares.

You seem to be under the impression that MySQL just "fails" on random read queries? That is nonsense.

In reality Facebook's db fleet is a massive sharded system, and sometimes shards are temporarily offline due to hardware failure on the shard's primary/writer node, but it's quite brief in the vast majority of cases. When you have such a massive number of servers, hardware failures happen many times a day.

Due to caching and other services it's also a multi-leveled data access stack, so a page load could fail due to some non-MySQL component having problems as well. Or a network issue, etc. It's not magically MySQL's fault every time something goes wrong at Facebook.

Meta uses MySQL for a variety of mission-critical use-cases, including financial ones. Every single committed MySQL write is replicated before success is returned to the calling code, nothing is lost or thrown away.

> Things that are missing in most other proper databases, like transactional DDL [...]

> some commercial thing like SQLServer or Oracle, where integritry is more highly important.

And yet Oracle DBMS does not have transactional DDL either, so why aren't you equally critical of it here?

Oracle can not group DDL changes in a transaction, but if an alter table results in an integrity violation the whole thing is rolled back, unlike mysql, that stops where the integrity violation occurs. Maybe Oracle is not as good as Postgres but it's workable. That's if you want to be shafted on licenses anyway.
That's simply not accurate! If an ALTER TABLE results in an integrity violation in MySQL, that ALTER TABLE is rolled back.

In modern MySQL, DDL is atomic and crash-safe on a per-statement basis. It's just not "transactional", in the sense that you can't combine multiple DDL statements (nor mix DDL and DML) into a single transaction.

See https://dev.mysql.com/doc/refman/8.0/en/atomic-ddl.html for reference.

Modern versions of MariaDB also have atomic DDL, although their underlying implementation is quite different.

And even in older versions of MySQL and MariaDB, an ALTER TABLE which causes an integrity violation was still rolled back. Think about it: the only possible non-instantaneous integrity violations are when adding a new unique key, new foreign key, or new check constraint. Check constraints didn't exist in old versions of MySQL or MariaDB, so that just leaves unique keys and foreign keys. And there's no notion of a "partially populated" index or a "half applied" foreign key constraint in MySQL, so your assertion of the ALTER just "stopping" mid-stream without rollback is just plain wrong.

  • hu3
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
In 2025? Often a tribalistic ignorance of holding outdated preconceptions against MySQL.

A quick search hints me that there is still more ultra-large MySQL setups than there are PostgreSQL. By a large margin it seems.

Between easier upgrades/HA, thread connection model, Vitess and engines like MyRocks, it's hard to beat for many use cases.

Time and survivorship bias can explain the ultra-large MySQL usage, given it used to be the popular choice.
  • WJW
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
MySQL used to have some rather dodgy defaults way back and some people haven't touched it for decades and assume it's still like that. Also it got acquired by Oracle at some point and many people just hate Oracle. Finally it is now cool to love Postgres more, or sqlite.

MySQL is fine, boring tech that powers a great many companies. There's nothing wrong with choosing it for a new venture, but there's also nothing wrong with another choice. Which RDBMS you use won't be the deciding factor in your success these days.

  • cies
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
We're using MySQL and collectively wish we were on Postgres.

It's waaaay more quirky in our experience.

Also: Oracle hate is not unwarranted, even in this day-and-age.

> There's nothing wrong with choosing it for a new venture

I'd advise anyone in that position not to choose MySQL. Go with Postgres unless you have a good reason not to.

What sort of quirks have you run into?

I find myself having to STRAIGHT_JOIN more often than I would like because it simply won’t generate sensible execution plans sometimes.

  • cies
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
so many. just some of the top of my mind:

* sub-query needs to be wrapped in a sub-query

* we had an issue recently (dont have the link at hand) where mysql team closed the bug as fixed but only documented it as a "know issue". we had to split up one query in 5 queries to fix this

* ask Lucas Eder what is a better db, he has intimate experience with all of 'm

Here are some we also run into:

https://www.codementor.io/@goetas/why-i-prefer-postgresql-to...

  • gnz11
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
MySQL is just fine for most cases. Postgresql has its warts too. Restoring a MySQL db is far simpler and smoother compared to Postgresql IMO for example.
  • WJW
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
My "favorite" postgres wart comes from a thing it should be good at: transactional ALTER TABLE. This works fabulously until you need to migrate a big (few hundred million rows, say) table in a way that requires a table rewrite. Vanilla Postgres will just lock up the table until it's done, so you need some online schema migration tool.

The fun thing is MySQL will also require schema migration tooling, but since their native migrations are so bad the tooling around it has evolved to be much better. Things like pt-osc and gh-ost will kick the butt of anything Postgres has, let alone when you pull out the big boy tools with Vitess.

Don't get me wrong, most databases will never need such tooling whether they're Postgres or MySQL. But still I find it interesting that (for the migration story at least) at small scale they're equal, then at medium scale Postgres wins out and at larger scales MySQL starts to win again.

  • cies
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
> at small scale they're equal, then at medium scale Postgres wins out and at larger scales MySQL starts to win again.

Nice insight!

I'd say because most apps wont reach mega scale, that on the small scale Postgres should win. Also having to deal with less quirks is really nice on small scale too!

MySQL 5 had bad defaults. Some would probably argue that hooking into sudo rather than a dedicated databaser user amounts to one. MySQL is also perceived by some to be a software for amateurs.

Unless you need the kind of sophisticated extensions Postgres supports MySQL is likely to be a good fit. The query planner is straightforward, performance tuning slightly more predictable and easy compared to Postgres.

MySQL is more user friendly. Examples are, autoincrement vs postgres sequences, case sensitivity, users ans databases are straightforward on mysql vs roles, dbs and schemas on postgres. Replications are also easy to setup on mysql.
> Some would probably argue that hooking into sudo rather than a dedicated databaser user amounts to one

What are you referring to here?

Postgres is administered through a postgres user.
Sure, and MySQL is administered through a mysql user.

When people talk about bad defaults in old MySQL, they're typically referring to lack of strict sql_mode by default prior to MySQL 5.7 (2015). They're not talking about OS users.

I've been using MySQL for 22 years and your comment about sudo bears no resemblance to anything I've ever experienced.

Not in my experience. It might run as a mysql user but I can't remember having su:d to it. Maybe you can give some examples of administration that require you to?

Collations and charsets and the DB engine and other stuff wasn't particularly good either, but I can't be arsed to figure out specifically when so I glossed over the details. I don't think it matters. 8 is what, a decade old or so?

> Maybe you can give some examples of administration that require you to?

That require you to what? Nothing in MySQL inherently requires sudo or involves "hooking into sudo".

The mysql server daemon (mysqld) typically runs as mysql:mysql, with directories owned by mysql:mysql in the Unix permission model, but this is all entirely dependent on how you have installed it.

Inside the database server, you can freely configure database users, which are entirely separate from the notion of OS users. Although the default superuser in MySQL is typically called "root", it can be called anything, and is not tied to the OS root user.

Connecting to MySQL can be done either via tcp/ip or locally through a Unix domain socket; this is all completely configurable on a per-database-user level inside the database itself.

When connecting over the local Unix domain socket, connections are permitted if the requested user name has a database user entry with @localhost for the host portion.

I suppose your OS user is relevant in two ways when using the local Unix domain socket:

* You need OS permissions to interact with the socket. That's the case with any Unix domain socket, not MySQL specific.

* If you're using the standard `mysql` command-line client and you haven't supplied a database user name for the connection, your OS user name will be used as a default.

So perhaps you were running `sudo mysql ...` to connect to the local mysqld because your OS user lacked the :mysql group to interact with the socket; or because your OS user did not have a corresponding database user/grants inside the database. In the latter case, you can just type `mysql -u root ...` instead to specify what database user to connect as. There's literally nothing requiring sudo in that case.

That said, you can optionally make this passwordless using the auth_socket auth plugin, in which case there are extra considerations around having the users match and maybe that's what happened to you. But there's no requirement to use that passwordless auth_socket approach for administration.

> Collations and charsets and the DB engine and other stuff wasn't particularly good either,

That's quite vague and it sounds like you aren't well-informed about MySQL in general so I suppose there's little sense in diving into it.

> I don't think it matters. 8 is what, a decade old or so?

MySQL 8.0 came out less than seven years ago, but that's irrelevant since everything I described above regarding permissions is equally true in MySQL 8.0.

None of this describes a su to the mysql user.

What's your experience with Postgres?

Correct, my assertion is that MySQL administration does NOT require use of sudo or su at all in any way. I was responding to your claim about MySQL administration “hooking into sudo rather than a dedicated databaser user” which is just wrong as described above.

To re-summarize, MySQL administration involves use of a mysql user (meaning, a user defined inside the database server and NOT an OS user), and since there is no 1:1 mapping between OS and db users in MySQL there is quite obviously no requirement to use sudo or su for anything at all.

Postgres is not relevant to that claim, as we’re discussing MySQL behavior here.

Furthermore none of this behavior is specific to MySQL 5 (it hasn't changed in 8.0, nor anything after it like 8.4 or 9.0) and none of it relates to defaults.

It's entirely possible some default changed in the package for your chosen Linux distribution / package management system, but that is outside of MySQL itself.

No, this is about comparison between Postgres and MySQL.

When you administrate Postgres you typically run psql as another user, with MySQL you typically don't, instead you tend to use the root@localhost in the database or sudo on the rather large set of binaries that gets installed with the server.

And I don't really care whether you think the old MyISAM engine was fine and not problematic or whether you've come across problems with utf8mb3 or latin1 or whatever, and I especially don't care whether you think I'm an experienced, professional MySQL user or not.

I’ve already explained repeatedly that use of sudo is completely unnecessary with MySQL. As for the rest, that’s gibberish - for example I certainly don’t think MyISAM is fine for anything, and have absolutely never said anything pro-MyISAM in all the years I’ve been on HN. As for utf8mb3, I literally make widely-used schema management software that flags any use of utf8mb3 as a problem by default.

I have no idea why you keep replying with non sequiturs, but I’m going to stop responding now, as you don’t seem to understand anything I am saying.

same as php hate, mysql had some questionable design decisions and legacy hacks, which are mostly not that relevant today except for causing some warts on the interface (like e.g. utf8mb4, mysql_real_escape_string)
  • cies
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
Very similar to PHP indeed!

PHP is also something I'd not advise anyone to use on a greenfield app unless you have really good reasons for doing so.

There are much better --also very conservative-- stacks available for free (and no, those are not JS based).

For instance: Kotlin, http4k, JTE/KTE (or kotlinx.html), SQLDelight, Postgress.

  • gnz11
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
You say you "advise" and don't give any specifics. So why Kotlin over the myriad of other options? Picking a LAMP stack is picking a stack that is battle tested — nothing wrong with that for new projects.
  • cies
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
Kotlin is basically Java 2.0. Kotlin has really great developer ergonomics and a huuuge ecosystem of Java libs you can easily use since you are on top of the JVM which (a much better tech than PHP). Kotlin being quite high-level fits well with webdev (I'd only use Rust for super perf critical web dev for instance). Kotlin is OO-code (easy for new devs) with lots of FP goodness (as that's where the party's at).

Big shops with big legacy PHP code bases all move away from it.

LAMP = Linux (sure), Apache (no-way, use NGINX or in app web server instead), MySQL (sorry, Postgres won) and PHP/Perl (these langs are going the way of the Dodo).

So LAMP is a bad choice nowadays. I'd say it has been since Ruby on Rails 1.0.

Golang and C# would be fine picks, too.
  • cies
  • ·
  • 2 weeks ago
  • ·
  • [ - ]
Not too familiar with C#, but it seems they have okay null-safety, and with some work you can have exhaustivity checked matches on sum types.

https://github.com/WalkerCodeRanger/ExhaustiveMatching

I prefer languages that have been designed with this in mind. Kotlin in this case goes a long way.

Golang is shit IHMO. No null-safety. No sum types. I dont know what Rob Pike was thinking when he designed this. Total disregard for the last 40 years of innovation in software engineering. Sad.

On big reason why many choose MySQL over Postgresql is this MySQL extension https://github.com/vitessio/vitess
  • cies
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
Thanks for actually answering the question!

Solutions like this also exist for PG, any insight into why vitess is better?

Some of the largest relational databases run on PlanetScale/Vitess. It's beyond battle hardened.
  • walth
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
Its great. We use it.

I'm not sure I would call it even close to battle hardened.

They are still many lurking footguns and bugs.

Try running it with > 250k tables. Falls down hard.

Error logic around etcd/topo server is very shaky, edge cases can wedge cells/clusters into broken state.

Because as tech people, we love transitive hate of technologies. We love to hate something because some blogger hates it.
Kinda relevant as the article won’t really help - what would you use for HA MySQL in a non-Kubernetes setting? Getting automated failovers, deployment of new nodes, and ~50k databases?
Was about to say that we managed upwards of 4k servers worth of MySQL databases (as in 4k baremetal servers worth, not 4k small VMs each having a small MySQL) using "Orchestrator" at Booking.com ten years ago. I checked if it was still kicking before writing this and found that the GitHub repo was archived last year. The next Google hit I find is this article from three days ago:

https://www.percona.com/blog/orchestrator-for-managing-mysql...

Please do some additional research into the state of maintenance of that piece of tech before jumping on it. But it certainly did a lot of powerful things for us back in the day. The automatic promotion of followers was key to our deployment.

That, and patching MySQL in weird ways. I recall something about the filesystem layer being monkeyed with, because "who needs safe writes, it slows things down"
Hahaha... Not galera!

Well kinda. Galera looks like it's an amazing solution, and it can be for careful operators who read the docs, learn the new procedures and ensure that they're running workloads that fit well. It can eliminate the usual HA / replication / failover stuff. But it has the ability to act like a foot-machinegun.

Outside kubernetes where you don't have an kubernetes operator that can run the database cluster, spin up nodes and pods, manage volumes etc it's difficult to imagine how you might automate that infrastructure in addition to managing the database cluster, without building a lot of it yourself.

Percona MySQL (i.e. Galera), ProxySQL, keepalived, the flavour of orchestration that is most compatible with your production environment and team.

Make sure you up ulimit and systemd LimitNOFILE in the MySQL service config. Read docs closely, preferably bring on someone who's spent some time making mistakes in this area to help out, test diligently before putting into production, including load tests.

  • kimi
  • ·
  • 3 weeks ago
  • ·
  • [ - ]
Never tried myself, but there is Vitess as well that should do what you ask - not sure about the limitations. https://vitess.io/
As it involves multiple steps they use candence-workflow to orchestrate it. You could use it in a non k8s environment. Or something like Prefect.io.
> The MySQL fleet at Uber consists of multiple clusters, each with numerous nodes.

This is written like unintentional comedy! I'm glad their nodes are so... numerous.

The nodes are numerous and important.

Please enjoy each one equally.

  • ·
  • 3 weeks ago
  • ·
  • [ - ]
Funny to read the negativity in here, I had the same impression. Also scaling MySQL is not interesting in 2025, seems outdated