page banner
avatar
'Managing configuration of a distributed system with Apache ZooKeeper: Loading initial configuration' post illustration
Managing configuration of a distributed system with Apache ZooKeeper: Loading initial configuration

This post is the second in the series of publications about using the Apache ZooKeeper for building configuration management solutions for a distributed system. It focuses on implementing a tool for loading initial configuration data into a fresh ZooKeeper ensemble.

avatar
'Managing configuration of a distributed system with Apache ZooKeeper' post illustration
Managing configuration of a distributed system with Apache ZooKeeper

One of the steps towards building a successful distributed software system is establishing effective configuration management. It is a complex engineering process which is responsible for planning, identifying, tracking and verifying changes in the software and its configuration as well as maintaining configuration integrity throughout the life cycle of the system.

Let's consider how to store and manage configuration settings of the entire system and its components using Apache ZooKeeper, a high-performance coordination service for distributed applications.

avatar
'Load balancing work between Java threads using ZeroMQ' post illustration
Load balancing work between Java threads using ZeroMQ

If you ever wrote production multi-threaded server in Java you know how it is difficult to implement load balancing between worker threads. You need to fight many issues to have good load balancer:

  1. You need to limit somehow the number of worker threads, because with unlimited thread pool you can have memory exhausted.
  2. You need to implement sophisticated procedure for clean worker shutdown.
  3. If you are using Executors you might now that they are not provide out of the box solution. You need to run into some tricks to have Executors do the load balancing job right.
  4. And for multi-threaded code you have to use those painful synchronized and locks that make your application lock up and/or degrade performance. And the debugging lock issues is a real pain.

ZeroMQ might tremendously help you with solving all these problems and much more. ZeroMQ is a high-performance asynchronous messaging library. It is native, but it has bindings for many languages and to be fair it is worth the hassle of dealing with native code.