Live data from Hacker News

Migrating Facebook to MySQL 8.0

engineering.fb.com

161–170 of 336 posts

Re: Migrating Facebook to MySQL 8.0

#161
Thanks, HermanL and PradeepN, for sharing this migration story with HN!

You wrote:

"Despite all the hurdles in our migration path, we have already seen the benefits of running 8.0."

May I ask what are the main performance benefits you have measured/noticed?

Re: Migrating Facebook to MySQL 8.0

#162
post #84

Earlier quoted context omitted.

gresrun works at YouTube, if by reference you mean citation then his comment is it.

wikibob was probably looking more for public documentation about the why and how rather than confirmation that the statement is true.

Probably because Youtube was using MySQL before being acquired and switched to a better, probably fully managed DB that was much easier (free?) to maintain and scale.

Re: Migrating Facebook to MySQL 8.0

#163
post #42

Earlier quoted context omitted.

Wow. Why don't they use in-house Google databases, which are supposedly vastly more scalable than MySQL?

Because there is a substantial cost to such migrations. If it works don't fix it.

If IT is on the value chain this seems insane. If IT is ancillary to the value chain then this is standard.

Re: Migrating Facebook to MySQL 8.0

#164
post #101

Earlier quoted context omitted.

I work for a government agency in a rather poor flyover state. We ran Oracle databases and a few other products for multiple decades, until Oracle conducted an audit and decided to shake us down for everything we were worth. We migrated away from their products, but only after being forced into expensive multi-year subscriptions for products that we didn't need. I will never forget the arrogance and greed of their le…

I'm no fan of oracle's audit approach but it sounds like you were expecting special leniency to not pay for their stuff - for decades - because you are a govt agency/ live in a low income place. Not how business works. If you're playing by the rules, no one can force you into any long term contracts you don't need.

I'm also a government Oracle dev. I have no way of knowing what I'm licensed for and they don't disable the features we're not licensed for. I literally have to talk to my director to talk to our account rep to figure out that I'm not allowed to use table partitioning.

Re: Migrating Facebook to MySQL 8.0

#165
post #51

Earlier quoted context omitted.

It's my opinion that schema changes should be cheap, fast and unexciting. Unfortunately, in my experience once you are operating at scale they are expensive, slow and fraught with peril. The result is that engineering teams often chose to build poorly designed schemas and take on technical debt rather than make a schema change to a core table. This is a terrible anti-pattern! I'm massively in favour of anything that…

Before Twitter migrated off their MySQL user database there were many columns that had been repurposed for exactly this reason.

I've been contemplating adding a JSON column to all of my tables just to provide somewhere that covers those cases - still controlled with source-code level validation and with the expectation that any column which needs to be used for filtering rows gets promoted to "real column" status.

I'd much rather use a robust, performant real schema migrations tool though.

Re: Migrating Facebook to MySQL 8.0

#166
post #3

It's interesting to see FB migrating so much over to Oracle. 2 weeks ago was FB use of GraalVM (from Oracle). And now this. https://news.ycombinator.com/item?id=27782475

I guess one could dream of the remote possibility that Facebook outright acquires Oracle. It seems like a weird match, but it'd give FB a toehold in a lot of verticals that it currently has no presence in. Whatever criticisms you have of FB, it's at least a pretty open source friendly company.

Facebook has no interest in infrastructure / enterprise revenue streams (Facebook for Work notwithstanding). See the history of Asana, Cloudera and Phabricator (and even Dropbox, from an employee/recruiting perspective, kinda).

Re: Migrating Facebook to MySQL 8.0

#168

Earlier quoted context omitted.

There is definitely stuff that is non-standard, like the casting with :: in addition to CAST AS. But it's true that PSQL sticks very closely to the standard or only adds on top of it, while MySQL is very uncomformant. Funnily enough, I actually first used Postgres over MySQL a long time ago when I moved from PHP to NodeJS, and was annoyed that MySQL uses backticks for identifiers while PSQL uses SQL standard double q…

It is practically essential for any RDBMS to provide non-standard statements and features. For example, even CREATE INDEX isn't in the SQL standard, since the SQL standard deliberately avoids talking about what it considers to be implementation details. This is probably a good goal in many ways. But what counts as an implementation detail is open to interpretation. You could say the same thing about the isolation lev…

Oh, it's totally fair to criticize the standard. Those clowns lock their deliberation and standard definitions behind huge paywalls.

The best way to learn the SQL standard is to read the Postgres docs since they clearly call out non-compliances - there is no other easy to access and clear explanation of the SQL standard.

Re: Migrating Facebook to MySQL 8.0

#169

Earlier quoted context omitted.

And yet MySQL is very much alive..? Java has fully opensource implementations too, and has had innovations like GraalVM and Jakarta EE. I think I'm too young to hate Oracle with a burning passion. I would be very scared of their sales/corporate team, but I mean, even having large contracts with Google or Amazon is difficult to say the least.

MySQL is alive for companies already using MySQL, but would well informed companies be choosing it today? I'm not so sure. I think you either want it to have more functionality and you choose Postgres, you want a particular performance profile and you pick MariaDB, or you want the enterprise support and you pick Oracle's database. Why you would pick Oracle-supported MySQL today I'm not sure.

Easy to operate, perhaps?

With MySQL group replication, it is pretty easy to set up a HA cluster that allows you to sleep soundly. It can also handle thousands of connections without the need of a connection pooler.

Re: Migrating Facebook to MySQL 8.0

#170
post #61

Perhaps it's due to me being in the PostgreSQL camp, but what happened to MariaDB? I was convinced that's where MySQL developers went and that's where development proceeded, while MySQL was just half dead, because Oracle did not care about it.

That was the expectation but the Oracle camp surprised everyone by actually giving it some attention, and meanwhile MariaDB's promise of being a "100% compatible drop-in replacement" came with more and more caveats with each release (as is to be entirely expected with any fork). When you consider the network effect of all the stacks already heavily invested in MySQL, all Oracle really needed to do was put in a modicu…

> meanwhile MariaDB's promise of being a "100% compatible drop-in replacement" came with more and more caveats with each release

Anecdata: I've been using mariadb as a drop in mysql replacement for over 5 years in production, and it's been working seamlessly.

I'm no DB expert, and perhaps my use case isn't complex enough or written in a highly mysql dependent way - but I felt like someone should chime in since there's not much positivity toward mariadb in this thread so far. I'd be interested to hear from some other people with actual mariadb experience.

Post reply on HN