Getting started Community Training Tutorials Documentation APIs, AI & Tools
Configuring Omni Gateway Configuration Caching in Connected Mode
To reduce scale-up time and increase resiliency, Omni Gateway caches its gateway configuration instead of each replica directly downloading the configuration from Anypoint Platform.
Configuration caching is enabled by default. To share cached configurations across replicas, you must configure distributed or Redis shared storage.
If Omni Gateway disconnects from Anypoint Platform, replicas use the cached configuration until connections are restored.
Anytime a configuration is updated, the gateway reloads all local configuration resources. Reloading resources doesn’t create any network downtime and only changes the updated configuration. However, the gateway logs a runtime info message for each resource. To reduce logs, adjust your runtime log level.
|
Distributed Configuration Caching
When you configure distributed or Redis shared storage, replicas share a single cached configuration instead of each replica caching its own copy. This reduces load on Anypoint Platform and speeds up replica startup.
Distributed configuration caching works by:
-
After the first Omni replica starts, the replica downloads the configuration from Anypoint Platform, encrypts the configuration, and stores it in shared storage.
-
After subsequent replicas start, they use the cached configuration rather than downloading from Anypoint Platform.
-
If the Omni Gateway configuration changes on Anypoint Platform, a replica downloads the configuration from Anypoint Platform and stores it in shared storage for immediate use by the other replicas.
If caching is configured and shared storage errors occur, each replica downloads configurations directly from Anypoint Platform.
Local Filesystem Caching
When no shared storage is configured, Omni Gateway uses the local filesystem storage. Because local filesystem storage isn’t shared between replicas, each replica caches its own configuration rather than sharing a cache with other replicas:
-
When a replica starts, it downloads the configuration from Anypoint Platform, encrypts it, and stores it in its local filesystem.
-
If the replica restarts, it reads the cached configuration from its local filesystem instead of downloading it from Anypoint Platform again.
-
If the Omni Gateway configuration changes on Anypoint Platform, the replica downloads the updated configuration and stores it to the local filesystem.
Configuration Cache Encryption
Omni Gateway encrypts the cached data that it receives from Anypoint Platform, such as TLS contexts, private keys, client secrets, and policy configuration. Encryption applies to Redis shared storage, distributed shared storage, and local filesystem storage.
By default, Omni Gateway derives the encryption key from the registration private key. To use a different key, set the FLEX_STORAGE_ENCRYPTION_KEY environment variable to a base64-encoded PEM private key. Set the same key on every replica that shares the storage.
To disable encryption, set the FLEX_CONTROL_NODE_STORAGE_ENCRYPTION_ENABLED environment variable to false.
Encrypt Existing Cached Data
Omni Gateway doesn’t encrypt data cached by versions earlier than 1.15.0. To encrypt existing data:
-
Clear the cached data from storage, for example, with
flexctl reset. See Resetting the Control Node Cache with the CLI. -
Restart all replicas.
| Don’t run replicas of versions earlier than 1.15.0 and replicas of version 1.15.0 or later on the same Redis shared storage. |
Enable Omni Gateway Configuration Caching
Configuration caching is enabled by default via the FLEX_DATASOURCE_CONTROL_NODE_ENABLED environment variable, which is set to true.
By default, each replica caches its configuration to local filesystem storage. To share cached configurations across replicas, configure a shared storage resource:



