Go-flagz, dynamic FlagSet updating through etcd

Hi guys,

I’d like to announce a library for dynamic management of Go flags.

It implements thread-safe flags that can be modified at run-time, hooking into the widely adopted pflags. It implements the dynamic management of Go flags through etcd, allowing for runtime modification of their values in a consistent fashion across multiple instances of the Go binary. This enables:

  • changing tuning parameters, e.g. RPC timeouts
  • building rich config files (using DynJSON) that drive complex behaviour of servers, e.g. rate-limiting configuration
  • easy inspection of the Go server’s flag configuration using a /debug/flagz Handler.

The concept isn’t new, as Google’s datacenter technology papers mention dynamic reconfiguration services. This is the first step towards achieving that in open-source.

We’ve been using this library in production at Improbable for a few months now, enabling a “restart-free” operational experience.

Comments, PRs and bug reports welcome :slight_smile:

Thanks,
Michal
Head of Infrastructure
Improbable

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.