You can run plugins in various contexts, depending on your environment needs. Each plugin can run globally, or be scoped to some combination of the following:
- Services
- Routes
- Consumers
- Consumer groups
Using scopes, you can customize how Kong handles functions in your environment, either before a request is sent to your backend services or after it receives a response. For example, if you apply a plugin to a single route, that plugin will trigger only on the specific path requests take through your system. On the other hand, if you apply the plugin globally, it will run on every request, regardless of any other configuration.
Global scope
A global plugin is not associated to any service, route, consumer, or consumer group is considered global, and will be run on every request, regardless of any other configuration.
- In self-managed , the plugin applies to every entity in a given workspace.
- In self-managed , the plugin applies to your entire environment.
- In Konnect, the plugin applies to every entity in a given control plane.
Every plugin supports a subset of these scopes.