Also, check out the Kafka design document. It's an excellent read:
http://incubator.apache.org/kafka/design.html