Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Reattaching Kafka EBS in AWS

Reattaching Kafka EBS in AWS

Worried about what happens when your Kafka brokers go down in AWS? Here's a solution to allow quick recovery while keeping your EBS volumes.
https://github.com/zalando-nakadi/bubuku/tree/master/instance_control
https://dzone.com/articles/reattaching-kafka-ebs-in-aws

Andrey Dyachkov

November 02, 2017
Tweet

Other Decks in Programming

Transcript

  1. Problems • Loss of instance • Changing instance type •

    Upgrading docker image • Kafka cluster upgrade
  2. Create Kafka node bubuku_cluster.py create --instance-count 1 --cluster-config $CONFIG •

    Create IAM profile • Create Security Groups • Allocate IP address • Wait for instance to be started • Start Kafka
  3. Terminate Kafka node bubuku_cluster.py terminate --cluster-config $CONFIG \ --ip 10.246.2.11

    \ --user adyachkov \ --odd odd-eu-central-1.aruha-test.zalan.do • Deattach EBS • Stop Kafka gracefully • Terminate instance
  4. Attach Kafka node bubuku_cluster.py attach --volume-id vol-1 --cluster-config $CONFIG •

    Create Kafka node • Attach provided EBS to it • Start Kafka
  5. Upgrade Kafka node bubuku_cluster.py upgrade --cluster-config $CONFIG \ --ip 10.246.2.11

    \ --user adyachkov \ --odd odd-eu-central-1.aruha-test.zalan.do • Deattach EBS • Stop Kafka gracefully • Terminate instance • Run new instance • Attach EBS • Start Kafka
  6. Get Kafka Cluster bubuku_cluster.py get --cluster-config $CONFIG 1 Ip 2

    Id 3 Volume 4 Availability zone 5 Image Version 172.31.144.11 i-05cf16fc8a4c7467d vol-0ed90a4b5239d73fb eu-central-1b kafka10.1.1 172.31.160.11 i-02405444a936b3e26 vol-0035d9c0a5cc64e2e eu-central-1c kafka10.1.1 172.31.128.12 i-078034bfde0e7d8a3 vol-0e13f305f678a07a8 eu-central-1a kafka10.1.1
  7. Impact No worries to lose a node during upgrade 10

    mins to upgrade a node 2 hours to upgrade a cluster x42 faster to upgrade
  8. Thank you for attention Your questions Article: https://dzone.com/articles/reattaching-kafka-ebs-in-aws https://jobs.zalando.com/tech/blog/reattaching-kafka-ebs-in-aws Slides:

    https://speakerdeck.com/adyach/reattaching-kafka-ebs-in-aws Scripts: https://github.com/zalando-nakadi/bubuku/tree/master/instance_control