Skip to content

ZooKeeper Dynamic Configuration

Chris Fregly edited this page Jun 17, 2013 · 8 revisions

Overview

  • FluxCapacitor uses ZooKeeper as its dynamic configuration source through archaius-zookeeper.

  • Changes to these ZK-based properties will be picked up dynamically at runtime using ZK's watcher/callback functionality.

Configuration

  • This implementation requires the path to the ZK root parent node that contains the hierarchy of configuration properties. An example is /[my-app]/config
  • Properties are direct ZK child nodes of the root parent ZK node. An example ZK child property node is /[my-app]/config/com.fluxcapacitor.my.property
  • The value is stored in the ZK child property node and can be updated at any time.
  • All servers will receive a ZK Watcher callback and automatically update their value similar to other dynamic configuration sources (ie. DynamoDB, etc.)
  • Any node created or updated under this node - even dynamically at runtime - will be accessible through the archaius dynamic property framework.

Example Configuration


archaius property name:  com.fluxcapacitor.my.property
ZK child node under the //config parent root node:  /[my-app]/config/com.fluxcapacitor.my.property

The value is retrieved from the /[my-app]/config/com.fluxcapacitor.my.property ZK node above.

Examples in Practice