Document updated on Oct 20, 2022
We call service settings (or the service layer) those parameters that allow you to change how KrakenD behaves globally (and not to a specific call). They determine how you start the HTTP server, enforce security parameters, or define behavioral options like which reporting activities occur, to name a few examples.
Examples of service settings are, the listening port, disabling keep alives, enabling metrics and traces, listening https, or enabling CORS to name a few.
If you haven’t done it yet, read Understanding the configuration file.
All service settings are written directly in the root of the configuration file or its corresponding extra_config
. So, for instance, here there is a configuration file describing a service listening on port 8080 with extended logging enabled:
{
"version": 3,
"port": 8080,
"endpoints": [],
"extra_config": {
"telemetry/logging": {
"level": "WARNING",
"syslog": true,
"stdout": true
}
}
}
The service accepts numerous configuration options that you’ll find explained through the rest of the documentation, but here is a preview of the most important ones:
"false"
| Your API contract, a.k.a the list of all endpoints recognized by this gateway. The /__health/ , /__debug/ , and /__stats/ endpoints are not controlled with this list. |
| The optional configuration that extends the core functionality of the gateway is specified here. The extra_config at this level enables service components, meaning that they apply globally to all endpoints or activity. |
| The TCP port where KrakenD is listening to. Recommended value is in the range 1024-65535 to run as an unpriviliged user Defaults to 8080 |
| The syntax version tells KrakenD how to read this configuration. This is not the KrakenD version. Each KrakenD version is linked to a syntax version, and since KrakenD v2.0 the version must be 3 Possible values are: 3 |
Other service-level settings you can add:
The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.