Live data from Hacker News

Migrating Facebook to MySQL 8.0

engineering.fb.com

331–336 of 336 posts

Re: Migrating Facebook to MySQL 8.0

#331

Earlier quoted context omitted.

5 Gigawatts to Kilowatts = 5000000 5000000 kilowatts / 1kW per machine = 5,000,000 machines internationally?

Yes, and that's a conservative lower bound (their web application servers likely draw much less than a kilowatt each and constitute a healthy portion of the fleet).

Global warming wise, should society really be focusing on using paper straws or should Facebook aim to make their server code 10% more efficient?

Re: Migrating Facebook to MySQL 8.0

#332

Earlier quoted context omitted.

Yes, and that's a conservative lower bound (their web application servers likely draw much less than a kilowatt each and constitute a healthy portion of the fleet).

Global warming wise, should society really be focusing on using paper straws or should Facebook aim to make their server code 10% more efficient?

The good news is that electricity still costs a lot, even at scale, so there is lots of financial incentive for hyperscalars to make their datacenters and computation maximally efficient. To wit: there are a lot of people at Facebook (and Google, and Amazon, and Microsoft, and Baidu....) who work on making their server code more efficient. Small changes can result in millions of dollars a year in savings (in electricity cost, infrastructure cost, and opportunity cost in not needing to procure more servers).

Re: Migrating Facebook to MySQL 8.0

#333
post #32
post #5

can it do DDL commands in a transaction yet?

I always see people asking about this. But why? Are you making schema changes that frequently?

Have you never written a migration in development that broke halfway through and required you to manually repair it?

Because I used to have to do that all the time seemingly before I finally got to pick my toolchain and I chose Postgres

Re: Migrating Facebook to MySQL 8.0

#334
post #95
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…

yeah treating every schema change as a db migration might be our industry's worst anti-pattern. transactional ddl allows you to do stuff like: begin tran ..refactor data, drop/create tables.. ..create backwards-compatible views.. commit ..against a live database without risking consistency

I would have very few cases where that works for me. Because I almost always need the database layer to continue to work for a time with both the old code and the new code update. Deployments usually roll out to pods a few at a time so changing the schema of a table suddenly will immediately throw errors all over the place.

Re: Migrating Facebook to MySQL 8.0

#335
post #267

Earlier quoted context omitted.

FANG would buy them if they had somehow managed to stumble forward to the mid-2010s.

Zero offers from any of them, so.

I don't think that FB were in a position back then. I was very surprised at the time that Google didn't buy them. Microsoft would never had gotten it past the regulators.

Re: Migrating Facebook to MySQL 8.0

#336
post #334
post #95

Earlier quoted context omitted.

yeah treating every schema change as a db migration might be our industry's worst anti-pattern. transactional ddl allows you to do stuff like: begin tran ..refactor data, drop/create tables.. ..create backwards-compatible views.. commit ..against a live database without risking consistency

I would have very few cases where that works for me. Because I almost always need the database layer to continue to work for a time with both the old code and the new code update. Deployments usually roll out to pods a few at a time so changing the schema of a table suddenly will immediately throw errors all over the place.

> Because I almost always need the database layer to continue to work for a time with both the old code and the new code update.

that's what the backwards-compatible views are for

Post reply on HN