API Gateways
API Gateways are the critical entry point to your services. They manage authentication, routing, rate-limiting, observability, and security at the edge of your infrastructure. In modern architectures—especially microservices and serverless platforms—the API Gateway is the first line of defence and performance optimisation.
With Unikraft Cloud, API Gateways benefit from a unikernel-based, scale-to-zero infrastructure that delivers the performance of specialised systems with the flexibility of serverless deployment.
Why run an API gateway on Unikraft Cloud?
⚡ Ultra-Low Latency
Unikernels remove the overhead of general-purpose operating systems by compiling only the required OS components alongside the API Gateway application. This results in:
- Sub-millisecond cold-start times (perfect for bursty API traffic).
- Minimal memory footprint, meaning more requests can be served per node.
- Consistent, predictable response latency at scale.
🛡️ Secure by Design
API Gateways are exposed to the open internet and are often the most attacked component. Unikraft Cloud isolates each instance at the virtual machine level while keeping footprint minimal:
- Immutable, single-purpose unikernel images reduce attack surface.
- Strong VM-level isolation without container overhead.
- Built-in memory safety and image signing to ensure trust at deployment.
💸 Scale-to-Zero Economics
Traffic to APIs often fluctuates—peaking during business hours, quiet overnight, and spiking during product launches. Traditional gateway clusters waste resources when idle. With Unikraft Cloud:
- API Gateways scale to zero when not in use, reducing idle costs to zero.
- Instant cold-starts ensure gateways are ready in microseconds when traffic resumes.
- Fine-grained billing: pay only for requests and runtime, not for idle VMs.
🔄 Serverless-Ready
API Gateways are a natural control point for serverless workloads. Running them on Unikraft Cloud enables:
- On-demand routing to serverless functions.
- Dynamic policy enforcement per request without worrying about idle nodes.
- Lightweight integration with edge compute for global distribution.
Getting Started
API Gateways on Unikraft Cloud combine VM-grade security with serverless agility. Ultra-fast, cost-efficient, and scale-to-zero—so your API edge is always ready, never idle.
This guide shows you how to use Tyk, a universal API management tool for REST, GraphQL, gRPC and async APIs. It offers open standards, scalability, governance, and AI-ready features for API development, security, and performance.
To run it, follow these steps:
-
Install the
kraft
CLI tool and a container runtime engine, e.g. Docker. -
Clone the
examples
repository andcd
into theexamples/tyk/
directory:
Make sure to log into Unikraft Cloud by setting your token and a
metro close to you. We use fra0
(Frankfurt, 🇩🇪) in this
guide:
Then invoke:
After deploying, you can query the service using the provided URL.
Use the /hello
path after the URL, such as below: