APIs · head to head
Spring Cloud Gateway vs TiDB

Spring Cloud Gateway
APIs
API gateway built on Project Reactor for building microservices
- From
- Free
- Free plan
- Yes

TiDB
Databases
Apache 2.0 distributed SQL database with MySQL wire compatibility and a separate columnar replica for analytical queries.
- From
- Free
- Free plan
- Yes
The short version
- Spring Cloud Gateway is a library for building API gateways.
- Spring Cloud Gateway is free; TiDB starts at $250/mo.
- Only Spring Cloud Gateway lists path Rewriting; only TiDB lists MySQL wire compatibility.
- Where Spring Cloud Gateway falls short: ships as a library for building a gateway on Spring, so you write, package and operate the gateway application yourself.
How do Spring Cloud Gateway and TiDB differ?
Spring Cloud Gateway and TiDB differ on pricing model (Open-source against Freemium), platforms and category (APIs against Databases). Only the attributes on which Spring Cloud Gateway and TiDB actually diverge.
| Attribute | Spring Cloud Gateway | TiDB |
|---|---|---|
| Pricing model | Open-source | Freemium |
| Platforms | API, Spring Boot | Web, AWS, Azure, Self-managed |
| Category | APIs | Databases |
| Founded | 1998 | 2015 |
Identical on both: starting price (Free), free tier (Yes).
Which features does each one have?
They share no listed features; 8 appear only for Spring Cloud Gateway and 10 only for TiDB. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.
Only in Spring Cloud Gateway
- Routing
- Path Rewriting
- Circuit Breaker
- Spring Boot
- Spring Security
- Spring Cloud
- Java support
- Spring Boot support
Only in TiDB
- MySQL wire compatibility
- Horizontal write scaling
- Distributed ACID transactions
- TiFlash columnar replica
- Automatic rebalancing
- Raft replication
- Apache 2.0 licence
- Online schema change
What is each one used for?
Spring Cloud Gateway is most often brought in for API Development. The jobs each tool is most often brought in to do.
Spring Cloud Gateway
- API Developmentnot TiDB
- API Gatewaynot TiDB
- API Testingnot TiDB
- API Documentationnot TiDB
- Microservicesnot TiDB
TiDB
- A MySQL workload that has hit the write ceiling of a single primary and would otherwise need an application-level sharding layernot Spring Cloud Gateway
- Reporting that must run against current transactional data, where the columnar replica removes the delay and the cost of an ETL pipelinenot Spring Cloud Gateway
- Multi-region deployments needing a single logical database with automatic failover rather than manual primary promotionnot Spring Cloud Gateway
- Migrating off a sharded MySQL estate where the sharding logic in the application has become the main source of bugs and operational toilnot Spring Cloud Gateway
Where do Spring Cloud Gateway and TiDB fall short?
Spring Cloud Gateway's most cited limit: ships as a library for building a gateway on Spring, so you write, package and operate the gateway application yourself. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
Spring Cloud Gateway
- Ships as a library for building a gateway on Spring, so you write, package and operate the gateway application yourself
- Offered in two variants, Server WebFlux and Server Web MVC, each with its own dependency, so you must pick a stack up front
TiDB
- A production cluster needs several placement driver, storage and SQL nodes before it is fault tolerant, so the minimum viable footprint is far larger than a MySQL server and TiDB is never the economical choice for a small database
- Every transaction takes a timestamp from the placement driver and crosses the network to storage nodes, so simple point queries are slower than on single-node MySQL and latency-sensitive paths need to be measured, not assumed
- MySQL compatibility is at the wire and dialect level but not complete; stored procedures, triggers and events are not supported, so an application that pushed logic into the database cannot simply be repointed
- The columnar replica is an extra full copy of the data on its own nodes, so hybrid analytics roughly doubles storage and adds hardware that must be sized and paid for separately
- Operating it well requires cluster-specific expertise in TiUP or the Kubernetes operator, region hot spots, and rebalancing behaviour, so the licence is free but the running cost includes an engineer who understands distributed storage
How much do Spring Cloud Gateway and TiDB cost?
Spring Cloud Gateway is free to use; TiDB has a free plan, with paid plans from $250/mo. Plan by plan below, from each vendor's own pricing page.
Spring Cloud Gateway
Free- Open SourceFree
- Core Spring Cloud Gateway
- Community support
TiDB
Free- ServerlessFree
- 5GB storage
- 50M request units
- Free forever tier
- Dedicated$250/mo
- Dedicated resources
- SLA guarantees
- Enterprise support
Which should you pick?
Choose Spring Cloud Gateway if
- You need routing.
- You want to start without paying.
- You work on API, Spring Boot.
- You also want path rewriting.
Choose TiDB if
- You need mysql wire compatibility.
- You want to start without paying.
- You work on Web, AWS, Azure, Self-managed.
- You also want horizontal write scaling.
Questions people ask
- Is Spring Cloud Gateway or TiDB better?
- It depends on the job. Spring Cloud Gateway fits aPI Development; TiDB fits a MySQL workload that has hit the write ceiling of a single primary and would otherwise need an application-level sharding layer. Spring Cloud Gateway starts at Free and TiDB at Free.
- Which is cheaper, Spring Cloud Gateway or TiDB?
- Spring Cloud Gateway starts at Free and TiDB at Free.
- Does Spring Cloud Gateway or TiDB run on more platforms?
- Spring Cloud Gateway runs on API, Spring Boot. TiDB runs on Web, AWS, Azure, Self-managed.
- Can I use Spring Cloud Gateway for free?
- Both have a free tier, so you can try either at no cost before committing.
- What is Spring Cloud Gateway best used for?
- Spring Cloud Gateway is most often used for api development, api gateway, api testing, api documentation. Of those, api development and api gateway are not what TiDB is typically brought in for.
- What can Spring Cloud Gateway do that TiDB cannot?
- Spring Cloud Gateway covers Routing, Path Rewriting, Circuit Breaker, Spring Boot. TiDB covers MySQL wire compatibility, Horizontal write scaling, Distributed ACID transactions, TiFlash columnar replica.
Answered from the vendors’ own pages
Spring Cloud Gateway: Is Spring Cloud Gateway free?
Yes, Spring Cloud Gateway is free and open-source software. It is part of the Spring ecosystem and available through GitHub repositories with open-source dependencies like spring-cloud-starter-gateway-server-webflux and spring-cloud-starter-gateway-server-webmvc.
SourceTiDB: Is TiDB a drop-in replacement for MySQL?
At the protocol and dialect level it is close, and most applications connect unchanged. Stored procedures, triggers and events are not supported, and latency characteristics differ, so it needs testing rather than assumption.
Spring Cloud Gateway: What enterprise support is available for Spring Cloud Gateway?
Tanzu Spring provides optional enterprise support including Day 0 access to security patches for organizations requiring guaranteed support, but specific pricing is not published on the Spring Cloud Gateway project page.
SourceTiDB: What licence is it under?
Apache 2.0, for both TiDB and the underlying TiKV storage engine. TiKV is a graduated CNCF project, which is a meaningful governance signal in a market where several competitors moved to source-available licences.
TiDB: Do I need TiFlash?
Only for analytical queries. It is an optional columnar replica; without it TiDB is a distributed transactional database. With it you get analytics on live data at the cost of an additional full copy.
TiDB: Is the managed cloud the same software?
TiDB Cloud runs the same engine, with the control plane, scaling and operational tooling provided as a service. The entry tier is metered differently from a dedicated cluster, so the cost model rather than the engine is what changes.
TiDB: When is TiDB the wrong choice?
When the database is small enough for one server, when latency on single-row lookups is the primary constraint, or when the application depends on MySQL stored procedures and triggers.
Related pages
More on Spring Cloud Gateway
Other head to heads
- Spring Cloud Gateway vs Kong Gateway
- Spring Cloud Gateway vs Tyk
- Spring Cloud Gateway vs Janus Gateway
- Spring Cloud Gateway vs WSO2 API Manager
- Spring Cloud Gateway vs Convoy
- Spring Cloud Gateway vs Gravitee
- Spring Cloud Gateway vs Zuplo
- Spring Cloud Gateway vs AWS API Gateway
- Spring Cloud Gateway vs HTTPie
- Spring Cloud Gateway vs KeystoneJS
- Spring Cloud Gateway vs Swagger/OpenAPI
- Spring Cloud Gateway vs GraphQL Apollo
- Spring Cloud Gateway vs Svix
- Spring Cloud Gateway vs Synctera
- Spring Cloud Gateway vs Tuum
- Spring Cloud Gateway vs Weavr
- Spring Cloud Gateway vs Codat
- Spring Cloud Gateway vs Courier
- Spring Cloud Gateway vs SingleStore
- Spring Cloud Gateway vs CockroachDB
- Spring Cloud Gateway vs YugabyteDB
- Spring Cloud Gateway vs Amazon Aurora
- Spring Cloud Gateway vs PlanetScale
- Spring Cloud Gateway vs MySQL
- Spring Cloud Gateway vs Vitess
- Spring Cloud Gateway vs Google Cloud Spanner
- Spring Cloud Gateway vs Elasticsearch
- Spring Cloud Gateway vs SAP HANA
- Spring Cloud Gateway vs DuckDB
- Spring Cloud Gateway vs Apache HBase
- Spring Cloud Gateway vs DBeaver
- Spring Cloud Gateway vs etcd
- Spring Cloud Gateway vs Fivetran HVR
- Spring Cloud Gateway vs Amazon ElastiCache
- Spring Cloud Gateway vs BigQuery
- Spring Cloud Gateway vs Amazon Neptune
- TiDB vs Kong Gateway
- TiDB vs Tyk
- TiDB vs Janus Gateway
- TiDB vs WSO2 API Manager
- TiDB vs Convoy
- TiDB vs Gravitee
- TiDB vs Zuplo
- TiDB vs AWS API Gateway
- TiDB vs HTTPie
- TiDB vs KeystoneJS
- TiDB vs Swagger/OpenAPI
- TiDB vs GraphQL Apollo
- TiDB vs Svix
- TiDB vs Synctera
- TiDB vs Tuum
- TiDB vs Weavr
- TiDB vs Codat
- TiDB vs Courier
- TiDB vs SingleStore
- TiDB vs CockroachDB
- TiDB vs YugabyteDB
- TiDB vs Amazon Aurora
- TiDB vs PlanetScale
- TiDB vs MySQL
- TiDB vs Vitess
- TiDB vs Google Cloud Spanner
- TiDB vs Elasticsearch
- TiDB vs SAP HANA
- TiDB vs DuckDB
- TiDB vs Apache HBase
- TiDB vs DBeaver
- TiDB vs etcd
- TiDB vs Fivetran HVR
- TiDB vs Amazon ElastiCache
- TiDB vs BigQuery
- TiDB vs Amazon Neptune
