Worker

A Worker is a process that runs separately from ConfigHub and communicates with ConfigHub to perform various tasks. There are two main reasons for having a separate process like this. First it allows certain tasks to be performed inside networks that ConfigHub does not have access to. Second it allows developers to build custom functionality by customizing Workers.

There are two main types of work performed by Workers: Function execution and Infrastructure bridging. Functions and Bridges are implemented as self-contained software modules that are then loaded up inside a Worker process where the Worker is responsible for communication between Functions and Bridges and ConfigHub.

When a function is executed from within ConfigHub, ConfigHub is responsible for routing the call to the Worker containing the function implementation and passing the input data to the Function via the Worker. The response from the function is sent back to ConfigHub by the Worker.

There is a well-defined API for implementing custom Bridges and Functions. The Worker interacts with this API and the Worker is responsible for reliable communication with ConfigHub. Bridge and Function implementations do not have to worry about that.

Workers primarily communicate with ConfigHub using a persistent HTTP2 duplex connection initiated by the Worker, which allows for ConfigHub-to-Worker communication when the Worker are behind firewalls.

For more details about how to run workers, see the guide.