Kong Gateway Deployment Considerations: A Study Guide

Before you install Kong Gateway, you need to plan six areas. Get them wrong and you will meet them later as outages, security holes or a gateway that will not start. This guide explains each area, then gives you memory hooks so the concepts stick.

Kong Gateway Deployment Considerations: A Study Guide

The big picture mnemonic: “Real Pandas Never Do Silly Licensing” or if you want learn more alinged you can remember it as Real Ports Never Do Security Licensing.

LetterArea
RResource sizing
PPorts (default ports)
NNetwork and firewall
DDNS
SSecurity and certificates
LLicensing

The order in the exam-style material is Resource, Ports, DNS, Network, Security, Licensing. If you want that exact order, use: “Really Peaceful Dragons Never Sleep Late” (R-P-D-N-S-L).

1. Resource Sizing Guidelines

Kong sits in the request path of every API call, so it must be sized for your traffic and your configuration. Kong’s own Resource Sizing Guidelines (see the Reference section of your lesson) give concrete numbers, but you should know the factors.

Factors to consider

  • Bandwidth: the network capacity between clients, Kong and your upstream services. Kong moves every request and response body, so a thin pipe becomes the bottleneck before CPU does.
  • Performance
    • Latency: the time Kong adds to each request. Every plugin you enable adds some.
    • Throughput: requests per second Kong can sustain.
  • CPU and RAM: Kong runs NGINX worker processes. More CPU cores means more workers and higher throughput. RAM holds the cached configuration and entities.
  • Database resources: in traditional (database) mode, Kong reads and writes configuration in PostgreSQL. The database must be sized for the number of entities and the Admin API write load. Kong caches entities, so runtime traffic does not hit the database on every request, but a slow or undersized database hurts startup, configuration changes and cache refreshes.
  • Scaling dimensions: what grows over time. Typical dimensions are request rate, number of Services, Routes, Consumers and plugins, payload size and number of data plane nodes. Scale horizontally by adding Kong nodes behind a load balancer; scale vertically by adding CPU and RAM per node.
  • Memory cache size: Kong keeps frequently used entities (Routes, Services, Consumers, credentials) in an in-memory cache, controlled by the mem_cache_size setting. If the cache is too small, Kong evicts entries and goes back to the database more often, which raises latency and database load.

Memory hook: “B-P-C-D-S-M” = “Big Pipes Carry Data, Speedy Machines”

Bandwidth, Performance, CPU/RAM, Database, Scaling, Memory cache.

To split performance quickly: Latency = how long one request waits; Throughput = how many requests fit through per second. Picture a motorway: latency is the journey time for one car, throughput is the cars per hour.

2. Default Ports

Kong listens on several ports, each for a different audience. There is a very memorable pattern.

ComponentHTTPHTTPS
Proxy (client traffic)80008443
Admin API80018444
Kong Manager (GUI)80028445
Dev Portal (GUI)80038446
Dev Portal API80048447

Pattern trick: HTTP ports count up from 8000 (0,1,2,3,4). HTTPS ports count up from 8443 (3,4,5,6,7). The order is always the same: Proxy, Admin, Manager, Portal, Portal API.

Mnemonic for the order: “Please Always Manage Portals Properly”.

Other ports worth knowing: hybrid mode uses 8005 (control plane to data plane cluster connection) and 8006 (telemetry), and PostgreSQL uses 5432. Check the Default Ports page in the Kong docs for the current full list.

Security rule of thumb: only the proxy ports face clients. Admin API, Kong Manager and the Dev Portal GUI should be reachable only by the people who need them.

3. DNS Considerations

DNS decides how people and browsers reach Kong’s different faces. Plan these before installation.

  • Kong Manager and Admin API hostnames: Kong Manager is a browser app that calls the Admin API. So Kong Manager needs to know the externally reachable URL of the Admin API (the admin_gui_api_url setting), and the Admin API URL must resolve from the user’s browser, not just from inside your network.
  • Portal API and Dev Portal hostnames: the same idea for the developer portal. The portal GUI calls the Portal API, so each needs a resolvable hostname.
  • CORS (Cross-Origin Resource Sharing) implications: if the GUI and the API live on different hostnames or ports, the browser treats them as different origins and blocks calls unless the API sends the right CORS headers. Plan your hostnames so CORS is configured correctly. Using a shared parent domain keeps this simpler.
  • Cookie management: Kong Manager and the Dev Portal use session cookies. Cookie domain, Secure flag and SameSite settings must match your hostname layout. Wrong settings give you a login that appears to succeed and then fails, because the browser refuses to send the cookie.

Memory hook: “Hosts Can Cause Cookie trouble” — Hostnames, CORS, Cookies. (Two GUIs, two APIs, four hostnames to think about.)

4. Network and Firewall

  • Firewall settings: open only what is needed. Allow clients to reach the proxy ports; restrict the Admin API and Kong Manager to administrators and trusted networks. Also allow Kong to reach its database and its upstream services.
  • Transparent proxying: Kong can intercept traffic without clients changing their configuration, by adding the transparent option to the proxy listener and setting up the host’s network rules to redirect traffic. Use it when Kong sits in the path as an invisible middleman.
  • Proxying TCP/TLS streams: Kong is not limited to HTTP. With stream listeners configured, it can proxy raw TCP and TLS traffic, which means opening and configuring extra ports for those streams.
  • Opening ports to clients: every port you expose is attack surface. Expose the minimum set to clients, normally just the proxy HTTP/HTTPS ports plus any stream ports you configured.

Memory hook: “Fire Walls Protect Traffic, Ports Open” or simply F-T-S-O: Firewall, Transparent, Streams, Open ports. Think of Kong as a front door (proxy) with a locked back office (Admin API).

5. Security and Certificates

This is the largest area, so break it into seven items.

  1. Securing the Admin API: the Admin API can change everything. By default it listens on localhost only. Keep it that way, or protect it with authentication, RBAC and network controls.
  2. Kong API loopback: a pattern where you expose the Admin API through Kong itself. You create a Service pointing at the Admin API and a Route for it, then apply authentication and other plugins to that Route. This gives you the plugin ecosystem (auth, rate limiting, IP restriction) in front of the Admin API.
  3. Data encryption and decryption: Kong Gateway Enterprise can encrypt sensitive fields (such as credentials and keys) stored in the database, using a keyring.
  4. RSA key pair management: the keyring uses an RSA key pair. The public key encrypts the key material and the private key decrypts it, so you must generate, store and back up the pair carefully. Lose the private key and you cannot read the encrypted data.
  5. Certificate management: manage TLS certificates, keys and SNIs (server name indications) that Kong uses to terminate TLS and to present the right certificate per hostname. Plan rotation before expiry.
  6. Secrets management (HashiCorp Vault integrations): instead of putting secrets in configuration, reference them from a vault (such as HashiCorp Vault) so Kong fetches them at runtime.
  7. Kong configuration enforce_rbac: turns on role-based access control for the Admin API and Kong Manager, so each admin only gets the permissions of their role.

Memory hook: “A Lock Ensures Real Certificates Stay Entirely safe”

Admin API, Loopback, Encryption, RSA keys, Certificates, Secrets (Vault), Enforce_rbac.

Story to remember it: a castle (Kong). The drawbridge is the proxy. The keep is the Admin API, guarded by RBAC (enforce_rbac) and reachable by a secret tunnel (loopback) only through guards (plugins). The treasure room is encrypted (keyring, RSA pair). The seals on letters are certificates. The vault holds the secrets.

6. Licensing

Kong Gateway Enterprise features need a valid license.

  • Deploying the license file: supply the license to every node, typically through the KONG_LICENSE_DATA environment variable or a license file in the location Kong expects. In hybrid mode, the control plane needs it and data plane nodes receive it from the control plane. Check the Licensing page in the Kong docs for the exact method for your version.
  • License expiration: licenses have an end date. Kong logs warnings as the date approaches, and Enterprise features stop working after it passes. Put the expiry date in your calendar and renew early.

Memory hook: “Deploy it, Don’t let it Die” — Deploy the file, Don’t let it expire.

7. Quick Revision Sheet

AreaKey itemsHook
ResourcesBandwidth, latency, throughput, CPU/RAM, DB, scaling, memory cacheBig Pipes Carry Data, Speedy Machines
Ports8000-8004 HTTP, 8443-8447 HTTPSPlease Always Manage Portals Properly
DNSHostnames, CORS, cookiesHosts Can Cause Cookie trouble
NetworkFirewall, transparent, streams, open portsF-T-S-O
SecurityAdmin API, loopback, encryption, RSA, certs, secrets, enforce_rbacA Lock Ensures Real Certificates Stay Entirely safe
LicensingDeploy file, expirationDeploy it, Don’t let it Die

8. Self-Test Questions

  1. Which two settings of Kong Gateway affect database load besides traffic volume? (Hint: cache size and number of entities.)
  2. What are the HTTP and HTTPS default ports for the Admin API? (8001 and 8444.)
  3. Why does Kong Manager need the externally reachable Admin API URL? (The browser calls it directly.)
  4. What does enforce_rbac do?
  5. What is the Kong API loopback and why use it?
  6. What happens if the private key of the RSA pair is lost?

Note: this guide follows your lesson outline and general Kong behaviour. Setting names, defaults and licensing mechanics can change between versions, so confirm exact values in the Kong documentation listed in your lesson’s Reference section.

Leave a Reply

Your email address will not be published. Required fields are marked *