A managed cache for Dedicated Cloud Gateways is a Redis-compatible datastore that powers all Redis-enabled plugins. This is fully managed by Kong in the region and provider of your choice, so you don’t have to host Redis infrastructure. Using a managed cache allows you to get up and running faster with Redis-backed plugins, such as Proxy Caching, Rate Limiting, AI Rate Limiting, ACME, and so on.
Configure an AWS managed cache for a Dedicated Cloud Gateway control plane
After your Dedicated Cloud Gateway AWS network is ready, send a POST request to the /cloud-gateways/add-ons endpoint to create your AWS managed cache.
Konnect will automatically create a shared Redis configuration for control plane managed caches.
Use the Redis configuration in a Redis-backed plugin, specifying the Konnect managed cache as the shared Redis configuration (for example: konnect-managed-a188516a-b1a6-4fad-9eda-f9b1be1b7159).
Prerequisites
Dedicated Cloud Gateway
This is a Konnect tutorial that requires Dedicated Cloud Gateways access.
If you don’t have a Konnect account, you can get started quickly with our onboarding wizard.
- The following Konnect items are required to complete this tutorial:
- Personal access token (PAT): Create a new personal access token by opening the Konnect PAT page and selecting Generate Token.
- Dedicated Cloud Gateway Control Plane: You can use an existing Dedicated Cloud Gateway or create a new one to use for this tutorial.
- Network ID: The default Dedicated Cloud Gateway network ID can be found in API Gateway > Network
- Set these values as environment variables:
export KONNECT_TOKEN='YOUR KONNECT TOKEN' export KONNECT_NETWORK_ID='KONNECT NETWORK ID'Copied!
Set up an AWS managed cache on a single control plane
Managed caches are created at the control plane level. To create a managed cache, you must associate it with a control plane.
-
List your existing Dedicated Cloud Gateway control planes:
curl -X GET "https://global.api.konghq.com/v2/control-planes?filter%5Bcloud_gateway%5D=true" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"Copied! - Copy and export the control plane you want to configure the managed cache for:
export CONTROL_PLANE_ID='YOUR CONTROL PLANE ID'Copied! -
Create a managed cache using the Cloud Gateways add-ons API:
curl -X POST "https://global.api.konghq.com/v2/cloud-gateways/add-ons" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN" \ --json '{ "name": "managed-cache", "owner": { "kind": "control-plane", "control_plane_id": "'$CONTROL_PLANE_ID'", "control_plane_geo": "us" }, "config": { "kind": "managed-cache.v0", "capacity_config": { "kind": "tiered", "tier": "small" } } }'Copied!When you configure a managed cache, you can select the small (~1 GiB capacity) cache size. Additional cache sizes will be supported in future updates. All regions are supported and you can configure the managed cache for multiple regions.
- Export the ID of your managed cache from the response:
export MANAGED_CACHE_ID='YOUR MANAGED CACHE ID'Copied! -
Check the status of the managed cache. Once it’s marked as ready, it indicates the cache is ready to use:
curl -X GET "https://global.api.konghq.com/v2/cloud-gateways/add-ons/$MANAGED_CACHE_ID" \ --no-progress-meter --fail-with-body \ -H "Authorization: Bearer $KONNECT_TOKEN"Copied!This can take about 15 minutes.
Configure Redis for plugins
For control plane managed caches, you don’t need to manually configure a Redis partial. After the managed cache is ready, Konnect automatically creates a Redis partial configuration for you. Use the Redis configuration to set up Redis-supported plugins by selecting the automatically created Konnect-managed Redis configuration.
You can’t use the Redis partial configuration in custom plugins. Instead, use env referenceable fields directly.
- In the Konnect sidebar, click API Gateway.
- Click your Dedicated Cloud Gateway.
- In the API Gateway sidebar, click Plugins.
- Click New plugin.
- Select Rate Limiting Advanced.
- In the Rate Limit Window Type fields, enter
100and3600. - Click View advanced parameters.
- In the Strategy dropdown menu, select “redis”.
- In the Shared Redis Configuration dropdown menu, select your Konnect-managed configuration. For example:
konnect-managed-a188516a-b1a6-4fad-9eda-f9b1be1b7159 - In the Sync Rate field, enter
5. - Click Save.
Important: If you’re configuring your plugins with decK, you must include the
konnect-managedpartial default lookup tag to ensure the managed cache partial is available. Add the following to your plugin config file:_info: default_lookup_tags: partials: - konnect-managedCopied!
Validate
Verify that the Rate Limiting Advanced plugin is using the managed cache partial configuration:
curl -X GET "https://us.api.konghq.com/v2/control-planes/$CONTROL_PLANE_ID/core-entities/plugins" \
--no-progress-meter --fail-with-body \
-H "Authorization: Bearer $KONNECT_TOKEN"
In the response, locate your rate-limiting-advanced plugin and confirm that config.strategy is set to redis and that the partials array contains your managed Redis partial:
"partials": [
{
"id": "dcf411a3-475b-4212-bdf8-ae2b4dfa0a04",
"name": "konnect-managed",
"path": "config.redis"
}
]