Live data from Hacker News

Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

engineering.tumblr.com

21–28 of 28 posts

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#21
post #14

My quick reading of this is that its suited for databases that don't change much (or at all) once the data is inserted, and not as much for apps that need to keep strong ACID compliance with guaranteed referential integrity.

We handle many thousands of write queries per second at Tumblr, and we use Jetpants to manage our entire MySQL topology, so trust me when I say the data changes quite often :) You can edit your existing posts on Tumblr, unlike on several other prominent social sites. Definitely please let me know how you got that impression though -- I'm happy to improve confusing things in the docs. As for ACID compliance: Jetpants…

I got the impression because I didn't see any discussion about the handling of bringing new slaves online (other than how to make it fast). Do you pause one of the slaves to get a consistent dump?

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#22
It looks interesting but one small thing. I looked into the transferring large files quickly link[1] and saw that they were using netcat and tar to transfer files. This is not necessarily optimal[2], and applying some compression can go a long way, although this will be dependent on the use case. Compression also has the added bonus of transferring less data across the network and (if you don't uncompress) less space at the other end.

SSH is also an option (a slow option, but an option) that provides certain things (encryption, authentication) that make it ideally suited for transfers across network boundaries.

[1] - http://engineering.tumblr.com/post/7658008285/efficiently-co...

[2] - http://www.ndchost.com/wiki/server-administration/netcat-ove...

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#23
post #22

It looks interesting but one small thing. I looked into the transferring large files quickly link[1] and saw that they were using netcat and tar to transfer files. This is not necessarily optimal[2], and applying some compression can go a long way, although this will be dependent on the use case. Compression also has the added bonus of transferring less data across the network and (if you don't uncompress) less space…

They're using pigz on [1] so they are compressing?

I thought it wasn't a great idea. OK for an on-the-fly solution to the problem but bittorrent or multicast would seem better; the serial route between machines isn't very fault tolerant requiring a start-from-scratch on failure.

socat > nc BTW, and does multicast.

As for ssh, it's a shame the "no encryption" option was removed.

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#24
post #23
post #22

It looks interesting but one small thing. I looked into the transferring large files quickly link[1] and saw that they were using netcat and tar to transfer files. This is not necessarily optimal[2], and applying some compression can go a long way, although this will be dependent on the use case. Compression also has the added bonus of transferring less data across the network and (if you don't uncompress) less space…

They're using pigz on [1] so they are compressing? I thought it wasn't a great idea. OK for an on-the-fly solution to the problem but bittorrent or multicast would seem better; the serial route between machines isn't very fault tolerant requiring a start-from-scratch on failure. socat > nc BTW, and does multicast. As for ssh, it's a shame the "no encryption" option was removed.

Wow, I completely missed pigz in there for some reason and had to look it up.

I agree with you on all counts though!

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#25
post #22

It looks interesting but one small thing. I looked into the transferring large files quickly link[1] and saw that they were using netcat and tar to transfer files. This is not necessarily optimal[2], and applying some compression can go a long way, although this will be dependent on the use case. Compression also has the added bonus of transferring less data across the network and (if you don't uncompress) less space…

[deleted]

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#26
post #21

Earlier quoted context omitted.

We handle many thousands of write queries per second at Tumblr, and we use Jetpants to manage our entire MySQL topology, so trust me when I say the data changes quite often :) You can edit your existing posts on Tumblr, unlike on several other prominent social sites. Definitely please let me know how you got that impression though -- I'm happy to improve confusing things in the docs. As for ACID compliance: Jetpants…

I got the impression because I didn't see any discussion about the handling of bringing new slaves online (other than how to make it fast). Do you pause one of the slaves to get a consistent dump?

Slave cloning is performed by shutting down mysqld on a standby slave and copying its raw data files. There's no dump involved. This is widely regarded to be the fastest possible way to clone a slave in MySQL.

This is explained in the deeper doc files -- didn't want to bog down the top-level README with implementation details.

Meanwhile, data exporting (for shard splits or table defragmentation) is done on a standby slave with replication stopped.

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#27
post #23
post #22

It looks interesting but one small thing. I looked into the transferring large files quickly link[1] and saw that they were using netcat and tar to transfer files. This is not necessarily optimal[2], and applying some compression can go a long way, although this will be dependent on the use case. Compression also has the added bonus of transferring less data across the network and (if you don't uncompress) less space…

They're using pigz on [1] so they are compressing? I thought it wasn't a great idea. OK for an on-the-fly solution to the problem but bittorrent or multicast would seem better; the serial route between machines isn't very fault tolerant requiring a start-from-scratch on failure. socat > nc BTW, and does multicast. As for ssh, it's a shame the "no encryption" option was removed.

re: fault tolerance, it's a fair point. Although in practice I've never had this fail part-way on me, and I've used it a couple hundred times with >600GB transfers.

We usually use this to copy to 2 or 3 machines at once; it's rare that we'd need to bring up 4+ slaves simultaneously, or split a shard into 4+ pieces. Most Linux distributions already have all the software needed except pigz, which is tiny and available in several packaging systems.

I'll definitely give socat a look though, thanks for the tip.

Re: Jetpants: a MySQL toolkit for managing billions of rows and hundreds of DBs

#28
post #23

Earlier quoted context omitted.

They're using pigz on [1] so they are compressing? I thought it wasn't a great idea. OK for an on-the-fly solution to the problem but bittorrent or multicast would seem better; the serial route between machines isn't very fault tolerant requiring a start-from-scratch on failure. socat > nc BTW, and does multicast. As for ssh, it's a shame the "no encryption" option was removed.

re: fault tolerance, it's a fair point. Although in practice I've never had this fail part-way on me, and I've used it a couple hundred times with >600GB transfers. We usually use this to copy to 2 or 3 machines at once; it's rare that we'd need to bring up 4+ slaves simultaneously, or split a shard into 4+ pieces. Most Linux distributions already have all the software needed except pigz, which is tiny and available…

Oh, OK, I agree, for 2-3 machines reliability isn't an issue, I was thinking more dozens.
Post reply on HN