Better HN
topnewbestaskshowjobs
Log inSign up

jivid

114 karma · joined Feb 23, 2013 (13y ago) · 42 submissions

Production Engineer @ Facebook - MySQL Infrastructure Facebook: facebook.com/dr
Submissions

comment 9y ago · link · parent

Super interesting post. Would love to read more detail about their backup and restore infrastructure.

If Tom and/or Shlomi are reading this: you mention taking multiple logical backups per day. What benefit does this bring versus just having one per day and doing a point-in-time restore using binlogs? Is this just a tradeoff between time taken for a restore and storage you're willing to dedicate to backups?

Disclaimer: I work on Facebook's MySQL backup and restore system (https://code.facebook.com/posts/1007323976059780/continuous-...)

comment 9y ago · link · parent

Author here.

We use it because it works well for us. We've put a lot of work into making MySQL scale for us to the point where it's a very well supported system and one of the main choices for a lot of storage decisions.

We even use MySQL as a queue for Facebook Messenger. More details about this:

https://www.youtube.com/watch?v=eADBCKKf8PA

https://code.facebook.com/posts/820258981365363/building-mob...

comment 10y ago · link · parent

In addition to what evanelias said, a logical dump also means we can load it into a MySQL instance running a different storage engine as well. In our case, it allows us to take a mysqldump from an InnoDB instance and load it into a MyRocks instance if we wish.

comment 10y ago · link · parent

Instance size varies a lot because we've got a lot of different MySQL workloads, some with very different configurations.

Remember we're backing up each database separately though, not the entire MySQL instance at once. Each database's backup is in a separate file.

comment 10y ago · link · parent

We run a single mysqldump with --single-transaction for each database on the server, nothing special.

comment 10y ago · link · parent

We take logical backups, not physical, and mysqldump is the best option for that. Having logical backups means we can do logical diffs as well (see https://youtu.be/Fe2oLZ4CWD4?t=951), and we've added table checksum support to mysqldump in our branch of MySQL (https://github.com/facebook/mysql-5.6/commit/54acbbf915935a0...)

comment 10y ago · link · parent

There's a few different ways to verify, a few of them involving stopping replication, like you pointed out. These can also sometimes be quite expensive, so depending on the type of verification required, the verification method can be tuned.

We also implemented table checksums inside of mysqldump, allowing us to dump out the restored data and compare checksums as well, if required. https://github.com/facebook/mysql-5.6/commit/54acbbf915935a0...

comment 10y ago · link · parent

> Do you diff against the same base, or create an incremental chain? How many diffs do you take in between recapturing a full image? At $DAYJOB we always take full backups into a fast in-house deduplicating store.

We always diff against the same base and have 5 days in between subsequent full dumps. The number of days just comes from a trade off between space occupied by the backups and time it takes to generate them.

> Is there no better way to handling this than polling?

There's definitely different ways to approach this, we find polling works well for us. We also use the same database for crash recovery, so doing the assignments through it serves both purposes.

> Presumably you can only get this parallelism by disabling FK integrity. Is it re-enabled in the following VERIFY stage?

I'm not sure what you mean by parallelism through disabling FK integrity. Splitting the backup into its tables means we can restore a subset of tables instead of the entire backup. This allows us to load individual tables concurrently, but also not have to wait to load a massive database if all we need is a few small tables.

9.

Continuous MySQL backup validation: Restoring backups(code.facebook.com ↗)

104 points · by jivid · 10y ago · 27 comments

comment 10y ago · link · parent

Facebook has a very extensive Python codebase as well. 21% of all backend code is Python:

https://code.facebook.com/posts/1040181199381023/python-in-p...

comment 10y ago · link · parent

It works on top of Quartz Composer, which is OSX only I believe.

12.

Origami – Design prototyping app by Facebook(facebook.com ↗)

1 points · by jivid · 10y ago · 2 comments

13.

Whatsapp Hits 1B monthly active users(facebook.com ↗)

3 points · by jivid · 10y ago · discuss

14.

EdgeDB – The next generation object database(edgedb.com ↗)

8 points · by jivid · 10y ago · 1 comment

15.

Instagram releases new app for mini video loops(theverge.com ↗)

1 points · by jivid · 11y ago · discuss

16.

Building 360 Video(code.facebook.com ↗)

4 points · by jivid · 11y ago · discuss

17.

What a $40 Video Has to Do with Becoming a Tech Unicorn(medium.com ↗)

1 points · by jivid · 11y ago · discuss

comment 11y ago · link · parent

Those addresses are websocket servers that seem to publish wikipedia changes. The app is just subscribing to the changes by opening a websocket connection to the appropriate server.

Looking at their other repos and the addresses you linked to, looks like the project for publishing the changes is at https://github.com/hatnote/wikimon, which is in turn getting changes from an IRC feed at https://meta.wikimedia.org/wiki/Research:Data#IRC_Feeds

comment 11y ago · link · parent

> If you have not been explicitly informed by us in a separate communication that we detected suspicious activity involving your Slack account, we are very confident that there was no unauthorized access to any of your team data (such as messages or files)

comment 12y ago · link · parent

This could be because Github's having issues with serving archives. See https://status.github.com/

EDIT: Should be working now

comment 12y ago · link · parent

Out of curiosity, what do you use as an alternative to Word if you do have to open something in a .doc/.docx format? Surely just saying "I don't have Word because I'm a developer" can't work in every situation?

comment 12y ago · link · parent

Instead of pausing the feed, maybe a simple 'Load X new tweets' banner at the top of the feed would do a better job? Twitter actually does exactly this when loading new tweets on the feed.

comment 12y ago · link · parent

The keypair AWS generates can only be downloaded once, at the time of instance creation. Beyond that, they expect you to be in possession of the keypair when launching another instance that uses the same keypair. If you happen to lose the file, you're basically out of luck.

So to directly address your concern, you can't download the keypair at any point in time, it's just a one time thing. To me that seems much more secure than emailing out a root password and enabling password authentication by default.

comment 12y ago · link · parent

I am a Digital Ocean customer and the only password they've ever emailed me is the root password for the server I just bought. Arguably this isn't as safe as AWS' process of making you download a kaypair and only letting you login with that. However, VPS owners should get in the habit of logging on to any server they buy and immediately disabling password auth and root login via SSH, which helps negate the root password being sent over email issue to a certain extent.

comment 12y ago · link · parent

There does seem to be a Python option below the fold.

comment 13y ago · link · parent

Correct me if I'm wrong, but aren't Kik Cards exactly what you're looking for?

comment 13y ago · link · parent

Google would be defined as google.com (or the appropriate geo-specific domain) since this map is specifically for websites, not companies owning the most popular products .

As for what would happen if they did group by company? I'm guessing that Google would be #1 pretty much everywhere, save maybe Russia and China.

12