Partials allow you to reuse shared Redis configurations across plugins.
Some plugins in Kong Gateway share common Redis configuration settings that often need to be repeated.
Partials allow you to extract those shared configurations into reusable entities that can be linked to multiple plugins.
Without Partials, you would need to replicate this configuration across all plugins. If the settings change, you would need to update each plugin individually.
To ensure validation and consistency, Partials have defined types.
Kong Gateway supports the following types of Partials; each plugin supports only one type:
redis-ce: A short and simple configuration.
redis-ee: A configuration with support for Redis Sentinel or Redis Cluster connections.
Any plugin that supports Redis configuration can reference those settings using Partial entities, enabling shared configuration across plugin instances.
In Konnect, Partials are only supported for bundled Konnect plugins. Custom plugins don’t support Partials.
By defining a Redis Partial once and then referencing it across these plugins, you avoid repeating connection details, reduce configuration errors, and ensure consistent Redis behaviour throughout your gateway. The following plugins use Redis for storing counters, sessions, or cached data:
In Konnect, open API Gateway from the sidebar, then choose a control plane.
In Kong Manager, select your Workspace.
Select Plugins.
Click New Plugin and choose a plugin.
Choose a scope for the plugin:
Global, which applies the plugin to all Gateway Services, Routes, Consumers, and Consumer Groups in the Workspace (Kong Manager) or control plane (Gateway Manager).
Scoped, which lets you choose a specific Gateway Service, Route, Consumer, or Consumer Group to apply the plugin to.
The types of entities you have available here depend on the plugin you picked.
Configure your plugin. The configuration options will depend on which plugin you picked.
In Konnect, open API Gateway from the sidebar, then choose a control plane.
In Kong Manager, select your Workspace.
Select Plugins.
Click New Plugin and choose a plugin.
Choose a scope for the plugin:
Global, which applies the plugin to all Gateway Services, Routes, Consumers, and Consumer Groups in the Workspace (Kong Manager) or control plane (Gateway Manager).
Scoped, which lets you choose a specific Gateway Service, Route, Consumer, or Consumer Group to apply the plugin to.
The types of entities you have available here depend on the plugin you picked.
Configure your plugin. The configuration options will depend on which plugin you picked.
You can leverage the Partials feature in your custom plugins by adjusting the plugin schema.
To make custom plugins compatible with Partials, add the supported_partials key to the schema and specify
the appropriate Partial type.
Here is an example schema for a custom plugin using a Partial:
Be aware that when using a Partial, the configuration belonging to the Partial is no longer stored alongside
the plugin. If your code relies on Kong Gateway’s DAO and expects entities to contain Redis information,
this data won’t be retrieved when using kong.db.plugins:select(plugin_id).
Such a call will only fetch data stored in the plugin itself.
To include the Partial’s data within the plugin configuration, you must pass a special option parameter,
such as: kong.db.plugins:select(plugin_id, { expand_partials = true }).