Kong 00:00:01 One order crosses the gateway A partner submits an order through Kong Gateway. The matched route points to the Orders service. Before that service receives the request, the gateway can establish a consumer identity and apply the corresponding traffic policy. The router finds the route with the highest priority that fits. It belongs to the service Orders. In this example key authentication identifies the partner as the consumer Acme. The configured authentication plugin runs before consumer-specific rate limiting. The limiter can now count calls from Acme instead of relying only on a network address. The request goes to the service, with headers that name the consumer. Response plugins run, and the log phase runs after the client has its answer. Observe both gateway rejections and upstream responses. A high upstream success rate can coexist with a gateway that rejects many valid partners. 00:00:59 Which plugin can use an identity? The operator wants access rules and limits to use the verified consumer. On the request path that information must exist before those rules evaluate. An ID for the request, then the browser rules. Authentication establishes who the request belongs to during the relevant phase. acl and rate-limiting come after identity, so they can use it. Request transformation and response or logging work occur in their configured execution phases. A log emitted after the response cannot change the earlier authorization decision. Plugins run at specific phases and according to the applicable execution order. Confirm the actual order and supported behavior of the deployed versions when one policy depends on another. 00:01:47 A reporting route has a different allowance The same shop has a cheap Orders API and an expensive reporting route. Configure limits at different scopes. A policy that appears globally may be overridden for a narrower match. Everybody gets 60 a minute. The service Orders allows 100. The route for reports allows 10, because reports are expensive. The consumer-and-route configuration in this example supplies fifty calls per minute for Acme on the reports route. Trace one consumer and one route through the precedence rules for that plugin. Adding all displayed limits together gives the wrong prediction. 00:02:25 One limit or one per node? The partner spreads requests across two gateway nodes. A local counter on each node and one shared counter can enforce very different aggregate traffic limits. Each node counts alone. 60 requests arrive at each. Each node lets 100 through. A shared counter can make the two nodes account against the same configured allowance. Synchronization settings affect precision. In this example the policy admits requests when the shared counter is unavailable. That preserves access while weakening the aggregate limit. A shared counter adds a dependency on its store. Decide explicitly whether store failure should reject traffic or temporarily weaken the limit, and measure that policy when the store is impaired. 00:03:12 The control plane is unavailable In a hybrid deployment, configuration travels from a control plane to data planes that serve requests. Disconnect the configuration channel and follow an existing route first. The control plane reads the database and pushes configuration to the data planes. During the control-plane outage, the running data planes keep handling existing routes with their last accepted configuration. When a data plane restarts, it reads the saved configuration before handling requests again. New routes and new keys. They arrive when the control plane is back. Serving from accepted configuration buys time for existing traffic. The price is a window during which new configuration cannot take effect. Set a recovery target for those changes as well as for user requests.