Kafka mirror tester: Go and Kubernetes powered test suite for kafka replication

By Ran Tavory

Elevator Pitch

Inspired by the Jepsen series of database test suites I create kafka-mirror-tester, a cross Atlantic automated test suite for Kafka mirroring using Golang and Kubernetes. There, I said k8s, need I say more? ;-)

Join me to learn how k8s solves database automation tasks and Go drives those tests.

Description

kafka-mirror-tester is an automated test suite for kafka mirroring used at appsflyer to test the correctness and effectiveness of various kafka mirroring tools, mainly uReplicator. kafka-mirror-tester automates the tasks of datacenters setup by creating two k8s clusters, one on each side of the Atlantic, then setting up kafka clusters at both sides, then setting up replication between them, running specialized Golang producers and consumers at both sides and then injecting faults to test durability. All done hands-free, completely automated.

Distributed systems. Are. Hard. At appsflyer Kafka is the backbone and part of my team’s work on multiple datacenter deployment was making sure we are able to mirror (replicate) kafka messages across datacenters. This kind of things you want to test before reaching production and you want to be able to simulate failure scenarios such as broker down, replicator down, slow network etc under the neon light so that you’d know what to expect in reality. To achieve that in a completely reliable and repetitive manner and inspired by the Jepsen series of semi-automated database test suites I’ve set our to create our own automated kafka mirroring test suite. Kubernetest, Prometheus, Golang and more on my toolbelt, I reached the goal and lived to tell. In this session you’ll learn about the interesting challenges of automating database and Kafka in particular tests, stressing out the system and making sure everything works correctly, and then tearing apart the system by injecting failure and observing the points where it breaks. This is fun!