Yashveer Singh
Connect
<- All posts
Backend, APIs, and System Design11 min read

API Gateway Patterns for SaaS: Kong, Tyk, AWS API Gateway Compared

An API gateway sits in front of your services and handles auth, rate limiting, routing, and observability before the request reaches your code. Kong and Tyk are the open source leaders. AWS API Gateway is the managed default for teams already on AWS. Each has a clear best fit. The teams that pick wrong end up either paying for features they do not use or self hosting a service they do not have capacity to operate.

Written by Yashveer Singh, founder of Yashveer Labs.

What you actually need to know

  • A gateway is not required on day one. Add it when you have real reasons.
  • Kong and Tyk are strong open source options for teams with infrastructure capacity.
  • AWS API Gateway is the managed default for teams already on AWS.
  • The cost crossover between managed and self hosted happens around tens of millions of requests per month.
  • In my experience, gateway choice rarely makes or breaks a SaaS. The discipline of using one well is what matters.
OptionHostingStrengthWatch out for
KongSelf hosted or Konnect cloudPlugin ecosystem, matureOperational cost if self hosting
TykSelf hosted or cloudStrong dashboard, similar to KongSame operational considerations
AWS API GatewayManagedTight AWS integrationCost at scale, vendor lock in
Cloudflare WorkersManaged edgeCheap, fast, simpleLess feature depth than dedicated gateways

The core argument

API gateways exist because the cross cutting concerns of an API are real. Authentication, rate limiting, routing, observability, request shaping. Without a gateway, each service rebuilds these. With a gateway, they live in one place that every service inherits from.

The mistake teams make is adding a gateway too early. A startup with three endpoints and one customer does not need a gateway. The team should focus on shipping. The gateway becomes valuable when one of three things happens. The team has multiple services that need consistent auth and rate limiting. The product has external API consumers who need a stable contract independent of the backend evolution. The compliance story requires central logging and access control.

The next mistake is picking the wrong gateway for the team. Kong is powerful and demands operational capacity. AWS API Gateway is convenient and demands acceptance of vendor lock in and per request pricing. Cloudflare Workers is cheap and limits the features available. Each fits a different team.

The framing I use on client projects is to ask three questions. Are you already on AWS deeply. Does the team have capacity to operate another stateful service. Is request volume going to grow fast. If the answers are yes, no, yes, AWS API Gateway is probably right. If the answers are no, yes, yes, Kong or Tyk are probably right. If the answers are no, no, no, you may not need a gateway at all.

When each one wins

Kong wins when. The team wants self hosted control and the operational capacity to run Postgres or Cassandra plus the gateway. The plugin ecosystem covers what you need or you have engineering willing to write plugins. The cost at scale is a real concern.

Tyk wins when. Similar to Kong, with a slight preference for built in dashboard and a different plugin model. Pick based on what the team finds easier to operate.

AWS API Gateway wins when. You are already on AWS and using IAM, Lambda, or CloudWatch. The traffic is predictable. The team prefers managed over self hosted. The cost per million requests fits the budget.

Cloudflare Workers wins when. The gateway needs are simple. Edge performance matters. The team values per request pricing that stays cheap at low to moderate volume.

What it actually costs

GatewayMonthly cost at 50M requestsOperational load
Kong self hosted200 to 800 dollars VM, free Kong OSSReal, requires DBA and ops
Tyk self hosted200 to 800 dollars VMReal, similar to Kong
AWS API Gateway50 to 200 dollars at REST, more at HTTPLow, managed by AWS
Cloudflare Workers50 to 250 dollarsVery low

Numbers above are based on 2026 published pricing and what I see in client engagements. Self hosting gets more competitive as scale grows. Managed gets more competitive at lower volume.

Features to demand from your gateway choice

  • A declarative configuration that lives in your repo. Avoid configuring through a UI as the source of truth.
  • Centralized auth. The gateway handles tokens before requests reach your services.
  • Rate limiting at multiple granularities. Per customer, per endpoint, per IP.
  • Observability hooks. Metrics, logs, traces, all exported to your existing stack.
  • A plugin or extension model for your specific cross cutting concerns.
  • A clear failure mode when the gateway is degraded. Fail open or fail closed depending on policy.

Expert opinion

The gateway that fits the team is the right gateway. The gateway with the best benchmarks is often the wrong gateway, because benchmarks rarely include the operational cost of running it. Pick the one your team can operate at three in the morning during an incident.

>

Yashveer Singh, founder of Yashveer Labs

How this plays out in practice

On a client project, the team initially picked Kong because it was the most powerful option. Six months later, they were spending more time operating the gateway than they were operating the product. We moved to AWS API Gateway because they were already on AWS. The migration took three weeks. The operational load dropped by about seventy percent. The cost per request went up slightly, but the team got the engineering hours back.

The opposite story is a team that started on AWS API Gateway and watched the bill grow as the product hit scale. At fifty million requests a month, the gateway alone was costing more than the rest of the infrastructure. They moved to Kong self hosted. The bill dropped by sixty percent. The operational cost was real but the savings paid for two more engineers.

For more on the broader topic, see REST vs GraphQL vs gRPC, building APIs that survive five years, and rate limiting algorithms compared.

Common mistakes teams make

  1. Adding a gateway too early, before there is a real reason.
  2. Self hosting Kong or Tyk without the operational capacity to run it.
  3. Picking AWS API Gateway and being surprised by the bill at scale.
  4. Configuring the gateway through the UI and losing the configuration when the cluster has to be rebuilt.
  5. No observability hooks, so the gateway becomes a black box.
  6. Treating the gateway as a place to put business logic. It is not. The gateway is for cross cutting concerns.

Where to start, a 30 day plan

  1. Week one. Decide if you actually need a gateway. Two services and a load balancer often suffice for small SaaS.
  2. Week two. If yes, evaluate options. Try Kong on a staging environment if self hosting feels viable. Try AWS API Gateway if managed feels right.
  3. Week three. Pick one. Migrate one endpoint to the gateway as a pilot. Confirm auth, rate limiting, and observability behave as expected.
  4. Week four. Migrate the remaining endpoints. Move configuration to a declarative format in your repo. Document the failure modes.

For deeper reading, API gateway patterns for SaaS Kong Tyk AWS API Gateway compared is this post, API authentication in 2026 covers what the gateway is enforcing, and the stateless API covers the service design that pairs well with a gateway.

FAQ

Frequently asked

Author

The engineering bet behind Yashveer Labs

The bet I am running with Yashveer Labs is simple. Most software is built by people who treat it as a job. I treat it as a craft. Yashveer Singh, founder. Five production systems on the board so far. The arc points at machine learning, AI engineering, and cybersecurity. If your project is in any of those orbits, you are reading the right page.

Related reading