Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The first step to Multi AZ architecture for Apache BookKeeper_Anup Ghatage

29 views

Published on

As software is increasingly deployed in public cloud environments, foundational platforms such as Apache BookKeeper must also continuously evolve to effectively work in multi availability zone environments and be designed to work around problems unique to such environments.
We at Salesforce added to BookKeeper the ability to function effectively in a Multi-AZ public cloud environment. The first step to this was adding awareness in bookies about their location in the cluster. We propose an approach to this problem which when using a kubernetes based deployment in public cloud environments, makes use of information natively provided by Kubernetes API, to determine their ‘location in the cluster’ also known as their ‘networkLocation’. The second step was to make this information available to the client. This was accomplished by adding the aforementioned ‘networkLocation’ as a field in the ‘cookies’ in a multi AZ environment. The field would be used to store the position of the bookie in the cluster. To make this network location available to the client, we added a mapping allowing client code to read this directly from the cookie.

Published in: Data & Analytics
  • Be the first to comment

  • Be the first to like this

The first step to Multi AZ architecture for Apache BookKeeper_Anup Ghatage

  1. 1. The first step to Multi AZ architecture for Apache BookKeeper (Durability and availability across zones!) Anup Ghatage Salesforce | Senior Member of Technical Staff Ankit Jain Salesforce | Senior Member of Technical Staff
  2. 2. Salesforce Carnegie Mellon University Anup Ghatage Salesforce Carnegie Mellon University Ankit Jain
  3. 3. ● ● ● ●
  4. 4. BookKeeper Basics
  5. 5. • • • • •
  6. 6. Bookie-0 Bookie-1 Bookie-2 Zookeeper Bookie-0 InstanceID: abc123 ledgerDir=/tmp journalDir=/tmp Cookie Bookie-1 InstanceID: abc123 ledgerDir=/tmp journalDir=/tmp Cookie Bookie-2 InstanceID: abc123 ledgerDir=/tmp journalDir=/tmp Cookie What is a cookie? ● It’s the identity of the bookie in the cluster ● Created when bookies are started ● Used to verify cluster membership and state of data in the bookie
  7. 7. • • • •
  8. 8. Why do we need a Multi AZ Architecture anyway?
  9. 9. “The problem for those sites that were brought down by the AWS outage is sites’ own failure to implement the one key design principle of the cloud — design with failure in mind. ” “The cloud is just a computer in Reston with a bad power supply” “The Azure cloud has experienced three unique and significant incidents that impacted customers.” “Savor “Fireplace For Your Home” on Christmas, rated four out of five stars and featuring “famous old-fashioned, wood-burning fireplace,”
  10. 10. • • • • •
  11. 11. Our design
  12. 12. • • •
  13. 13. • • •
  14. 14. AWSAzure GCP Kubernetes us-west 2a us-west1 a West US az1 Bookie-0 InstanceID: abc123 ledgerDir=/tmp journalDir=/tmp Cookie Bookie-0 InstanceID: abc123 ledgerDir=/tmp journalDir=/tmp networkLocation= /region+zone/upgradeDomain Cookie Region AZ
  15. 15. • • • • •
  16. 16. • • networkLocation
  17. 17. What a Multi AZ Architecture enables
  18. 18. • • • • • Reference: Charan Guttapalem - bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ZoneawareEnsemblePlacementPolicy.java
  19. 19. ● ● ●
  20. 20. Questions?

×