Cratopus icon
FAST!

Engineering for the 'No-Ops' Era: Crate vs. Kong

Written by Derrick Antaya

Kong is an industry titan. Built on the venerable OpenResty (Nginx + Lua) stack, it has powered some of the largest API deployments in history. But as we move into 2026, the ‘Managed Complexity’ of the Nginx-wrapper model is beginning to show its age.

When we built Crate, we didn’t want to build a better ‘wrapper.’ We wanted to rethink the proxy engine for a world that demands dedicated isolation and zero-dependency deployments.

I. The Architecture of Managed Complexity

In a managed environment like Kong Konnect, you are often interacting with a ‘bolted-on’ cloud layer. The underlying engine still relies on a complex web of C-bindings and LuaJIT scripts to handle request logic.

  • Kong: Every request triggers a series of Lua hooks. While LuaJIT is impressively fast, it still introduces an interpretive layer between the raw Nginx C-code and your business logic.
  • Crate: Built entirely in Go. Our data plane and control plane share the same memory model and the same type-safety. There is no ‘bridge’ to cross, no C-bindings to manage, and no interpretive tax.

II. Physical Isolation: Beyond ‘Noisy Neighbors’

Most managed gateways achieve ‘scale’ by packing as many customers as possible onto shared, massive Nginx clusters. Even with virtualization, you are fighting for the same CPU cache and the same network interface cards (NICs).

The Crate Approach: Dedicated Hardware for Business

We don’t just pin cores or use “islands” of resources.

  1. Physical Separation: On our Business Tier, we provision entirely separate bare-metal servers for your gateway.
  2. Zero Resource Contention: You aren’t just isolated from other customers’ traffic; you aren’t even on the same motherboard.
  3. No Hypervisor Jitter: By running on raw metal, we remove the 1-2ms of jitter and “steal time” associated with hypervisors in AWS or GCP.

III. Transformation Performance: LuaJIT vs. Native JSONata

In a high-throughput API, body transformation is usually the most expensive operation. Kong handles this via Lua plugins.

// Theory: The JSONata Transformation Pipeline
// By using a sync.Pool for our transformation buffers, we 
// minimize GC pressure during high-concurrency bursts.
var bufferPool = sync.Pool{
	New: func() interface{} {
		return new(bytes.Buffer)
	},
}

func (g *Gateway) Reshape(input []byte, query string) ([]byte, error) {
	buf := bufferPool.Get().(*bytes.Buffer)
	buf.Reset()
	defer bufferPool.Put(buf)
	
	// Native Go execution of JSONata ensures we stay 
	// within our 5ms transformation budget.
	return jsonata.ExecuteToBuffer(buf, input, query)
}

By leveraging sync.Pool and Go’s native concurrency, Crate handles complex object reshaping with a lower memory overhead than interpreted Lua scripts. This allows us to maintain sub-2ms overhead even when your payloads are several megabytes in size.

IV. The ‘No-Ops’ Philosophy: Zero-Dependency Stability

Kong often requires a sidecar database (PostgreSQL) just to manage configuration state. Even in ‘DB-less’ mode, the sync logic between the control plane and data plane is a known point of failure.

Crate is Stateless by Design.

  • Configuration is pushed to nodes via a secure gRPC stream.
  • Routing tables are hot-swapped in memory using atomic.Value.
  • There is no ‘Sync Hell.’ If a node is healthy, it has the latest config. Period.

Comparison Summary

Metric Kong (Managed) Crate.cc
Core Engine Nginx / LuaJIT Native Go
Isolation Shared Multi-tenant Clusters Dedicated Physical Servers
Dependency Database (Postgres) Stateless / gRPC
Memory Footprint ~500MB+ ~40MB
Config Updates Deployment Sync Atomic Hot-Swap