Shared Configuration

Jeff Byrnes edited this page Dec 10, 2013 · 5 revisions

Exhibitor relies on being able to share configuration with each running instance. In the standalone version this is accomplished either by using Amazon’s S3, a shared/networked file or a separate ZooKeeper cluster. If you are integrating Exhibitor into your own application you can use one of these methods or another of your choosing (e.g. a RDBMS).

When changes to the configuration are made in the Exhibitor web application, the other instances will notice the change and act accordingly. If needed, each ZooKeeper instance will be stopped, the zoo.cfg rebuilt and ZooKeeper restarted.

S3 – configuration type “s3”

At Netflix we are currently using Amazon’s S3 for shared configuration.

Here is an example IAM policy to allow Exhibitor to communicate with an S3 bucket:

{
  "Statement": [
    {
      "Sid": "Stmt1386687089728",
      "Action": [
        "s3:AbortMultipartUpload",
        "s3:DeleteObject",
        "s3:GetBucketAcl",
        "s3:GetBucketPolicy",
        "s3:GetObject",
        "s3:GetObjectAcl",
        "s3:ListBucket",
        "s3:ListBucketMultipartUploads",
        "s3:ListMultipartUploadParts",
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Effect": "Allow",
      "Resource": [
        "arn:aws:s3:::bucket-name/*",
        "arn:aws:s3:::bucket-name"
      ]
    }
  ]
}

This diagram shows how it works:

File – configuration type “file”

Alternatively, you can use a shared/networked file for shared configuration:

ZooKeeper – configuration type “zookeeper”

Exhibitor supports using a dedicated ZooKeeper ensemble for storing shared configuration. That ZooKeeper ensemble can even run Exhibitor (in “standalone mode” – configuration type “none”):