Links for 2013-03-06

  • Online Schema Change for MySQL

    A tool written by Facebook to ease the pain of online MySQL schema-change migrations.

    Some ALTER TABLE statements take too long form the perspective of some MySQL users. The fast index create feature for the InnoDB plugin in MySQL 5.1 makes this less of an issue but this can still take minutes to hours for a large table and for some MySQL deployments that is too long.   A workaround is to perform the change on a slave first and then promote the slave to be the new master. But this requires a slave located near the master. MySQL 5.0 added support for triggers and some replication systems have been built using triggers to capture row changes. Why not use triggers for this? The openarkkit toolkit did just that with oak-online-alter-table. We have published our version of an online schema change utility (OnlineSchemaChange.php aka OSC).

    (tags: facebook mysql sql schema database migrations ops alter-table)

  • Netflix Queue: Data migration for a high volume web application

    There will come a time in the life of most systems serving data, when there is a need to migrate data to [another] data store while maintaining or improving data consistency, latency and efficiency. This document explains the data migration technique we used at Netflix to migrate the user’s queue data between two different distributed NoSQL storage systems [SimpleDB to Cassandra].

    (tags: cassandra netflix migrations data schema simpledb storage)

  • Monitoring Apache Hadoop, Cassandra and Zookeeper using Graphite and JMXTrans

    nice enough, but a lot of moving parts. It would be nice to see a simpler ZK+Graphite setup using the ‘mntr’ verb

    (tags: graphite monitoring ops zookeeper cassandra hadoop jmx jmxtrans graphs)

  • RFC 6585 – Additional HTTP Status Codes

    includes “429 Too Many Requests”, for rate limits

    (tags: api rfc http reference standards web rest)

  • Curator Framework: Reducing the Complexity of Building Distributed Systems | Marketing Technology

    good +1 for using Netflix’ Curator ZK client library

    (tags: zookeeper curator netflix oss libraries distributed)

  • Netflix Curator

    a high-level API that greatly simplifies using ZooKeeper. It adds many features that build on ZooKeeper and handles the complexity of managing connections to the ZooKeeper cluster and retrying operations. Some of the features are: Automatic connection management: There are potential error cases that require ZooKeeper clients to recreate a connection and/or retry operations. Curator automatically and transparently (mostly) handles these cases. Cleaner API: simplifies the raw ZooKeeper methods, events, etc.; provides a modern, fluent interface Recipe implementations (see Recipes): Leader election, Shared lock, Path cache and watcher, Distributed Queue, Distributed Priority Queue

    (tags: zookeeper java netflix distcomp libraries oss open-source distributed)

  • OscarGodson.js | What I Learned At Yammer

    some pretty interesting lessons, it turns out: a ‘take what you need’ vacation policy means nobody takes vacations (unsurprising); Yammer actively work to avoid employee burnout (good idea); Yammer A/B test every feature; and Yammer mgmt try to let their devs work autonomously.

    (tags: yammer startups testing analytics culture work)

  • moreutils

    Some really cool-looking UNIX command line utils, packaged in Debian (and therefore in Ubuntu too). A few of these I’ve reimplemented separately, but it’s always good to replace a hack with a more widely available “official” tool. Thanks, Joey Hess!

    sponge: accept input, wait til EOF, then rewrite a file; chronic: runs a command quietly unless it fails; combine: combine the lines in two files using boolean operations; ifdata: get network interface info without parsing ifconfig output; ifne: run a program if the standard input is not empty; isutf8: check if a file or standard input is utf-8; lckdo: execute a program with a lock held; mispipe: pipe two commands, returning the exit status of the first; parallel: run multiple jobs at once; pee: tee standard input to pipes; sponge: soak up standard input and write to a file; ts: timestamp standard input; vidir: edit a directory in your text editor; vipe: insert a text editor into a pipe; zrun: automatically uncompress arguments to command

    (tags: bash shell cli unix scripting via:peakscale joey-hess debian ubuntu tools command-line commands)

  • Test-Driven Infrastructure with Chef

    Interesting idea.

    The book introduces “Infrastructure as Code,” test-driven development, Chef, and cucumber-chef, and then proceeds to a simple example using Chef to provision a shared Linux server. The recipes for the server are developed test-first, demonstrating both the technique and the workflow.

    (tags: tdd chef server provisioning build deploy linux coding ops sysadmin)

  • Peek and poke in the age of Linux

    Neat demo of using ptrace to inject into a running process, just like the good old days ;)

    Some time ago I ran into a production issue where the init process (upstart) stopped behaving properly. Specifically, instead of spawning new processes, it deadlocked in a transitional state. […] What’s worse, upstart doesn’t allow forcing a state transition and trying to manually create and send DBus events didn’t help either. That meant the sane options we were left with were: restart the host (not desirable at all in that scenario); start the process manually and hope auto-respawn will not be needed. Of course there are also some insane options. Why not cheat like in the old times and just PEEK and POKE the process in the right places? The solution used at the time involved a very ugly script driving gdb which probably summoned satan in some edge cases. But edge cases were not hit and majority of hosts recovered without issues.

    (tags: debugging memory linux upstart peek poke ptrace gdb processes hacks)

This entry was posted in Uncategorized. Bookmark the permalink. Both comments and trackbacks are currently closed.

One Comment

  1. Posted March 7, 2013 at 21:31 | Permalink

    Netflix Curator is fantastic. It makes working with Zookeeper so much easier.