Relay Proxy
FeatBit Agent

FeatBit Agent

This is a general introduction of FeatBit Agent, if you are looking for detailed instructions of installing FeatBit Agent, please refer to this doc (opens in a new tab).

FeatBit Agent (the GitHub repo is here (opens in a new tab)) is a small program that sits between the FeatBit Server and your SDKs and providing both a cached read replica and a relay proxy of your FeatBit Server. This means you can scale up your FeatBit to serve tens of thousands of connected SDKs without increasing the load on your FeatBit Server.

FeatBit Agent provides four important features:

  • Performance: FeatBit Agent caches the feature flags (opens in a new tab) and segments in memory. A single FeatBit Agent instance running on a machine with minimal resources can support thousands of WebSocket connections, you can scale it up to support tens of thousands of WebSocket connections without duplicating FeatBit Server.
  • Low latency: The FeatBit Agent has the capability to run in close proximity to end users, resulting in a significant reduction in latency for users located far from the FeatBit Server.
  • Data Protection: When you deploy FeatBit Agent on your customer's infrastructure, you can configure it to either not forward user usage data to the FeatBit Server and keep the data locally, or to perform data anonymization before sending it to the FeatBit Server. This ensures compliance with GDPR and other data protection laws, and promotes the protection of user data and privacy.
  • Resilience: The FeatBit Agent is designed to survive restarts and operate properly even if you lose connection to your FeatBit Server.


FeatBit Agent supports two different modes:

  • Agent: Connection to FeatBit Server, supports dynamic feature flags, segments and environment keys synchronization and other advanced features.
  • Offline: No connection to FeatBit Server, full control of data and environment keys.

Agent Mode

Agent is the default mode and should be used by default in most cases. It connects to the FeatBit Server and uses it as the source of truth for feature flags, segments and environment keys.

User uage data can be configured to remain on the agent or to be anonymised before being sent to the FeatBit Server.

By default, Agent mode uses an in-memory cache to store the features it fetches from the FeatBit Server. However, you may want to use a more persistent storage solution. For this purpose, the FeatBit Agent supports either Redis or a backup file, which you can configure by passing in when starting the Agent. The FeatBit Agent will then check on startup to see if the persistent backup option is specified, in which case it will use it to populate its internal caches. This can be useful if your FeatBit server is unreachable.

When using Redis as storage solution, multiple agents can share the same Redis, allowing FeatBit Agent to scale horizontally to a cluster and maintain the data consistancy.

Offline Mode

Offline mode should be used when you don't have a connection to the FeatBit Server. It can also be used when you need to have full control over both the data your clients receive and which environment keys can be used to access it.

Since this mode does not connect to a FeatBit Server, it requires a JSON dump of feature flags (opens in a new tab), segments and environment keys. You can configure FeatBit Server to send this dump to your FeatBit Agent instance by creating a relay proxy on the FeatBit UI or by starting the Agent with a dump file containing the data.