There are a number of limitations you should be aware of when using Kong Gateway in DB-less
mode.
The entire configuration of entities must fit inside the Kong Gateway
cache. Make sure that the in-memory cache is configured appropriately in kong.conf
:
Parameter |
Description |
mem_cache_size
Default: 128m
|
Size of each of the two shared memory caches
for traditional mode database entities
and runtime data, kong_core_cache and
kong_cache .
The accepted units are k and m , with a minimum
recommended value of a few MBs.
Note: As this option controls the size of two
different cache zones, the total memory Kong
uses to cache entities might be double this value.
The created zones are shared by all worker
processes and do not become larger when more
workers are used.
|
Since there is no central database, Kong Gateway nodes have no
central coordination point and no cluster propagation of data.
Nodes are completely independent of each other.
This means that the declarative configuration should be loaded into each node
independently. Using the /config
endpoint doesn’t affect other Kong Gateway
nodes, since they have no knowledge of each other.
Since the only way to configure entities is via declarative configuration,
the endpoints for CRUD operations on entities are effectively read-only
in the Admin API when running Kong Gateway in DB-less mode. GET
operations
for inspecting entities work as usual, but attempts to POST
, PATCH
PUT
or DELETE
in endpoints such as /services
or /plugins
will return
HTTP 405 Not Allowed
.
This restriction is limited to what would otherwise be database operations. In
particular, using POST
to set the health state of targets is still enabled,
since this is a node-specific in-memory operation.
Kong Manager cannot guarantee compatibility with Kong Gateway operating in DB-less mode. You cannot create, update, or delete entities with Kong Manager when Kong Gateway is running in this mode. Entity counters in the Summary section on the global and workspace overview pages will not function correctly either.
Not all Kong Gateway plugins are compatible with DB-less mode. By design, some plugins
require central database coordination or dynamic creation of
entities.
For current plugin compatibility, see Plugins.