If you're building or scaling a web service, you've run into the terms tunneling, API gateway, and edge computing — often used interchangeably. They're not the same thing, and choosing the right one (or the right combination) makes the difference between a clean architecture and a brittle mess.
This guide explains what each one is, when to use it, and how Ngris combines all three in a single platform.
What is Tunneling?
Tunneling creates a secure, encrypted link between a local server and a public endpoint on the internet. It's how developers expose localhost:3000 to the outside world without opening firewall ports, configuring NAT, or buying a static IP.
When to use tunneling
- Webhook development — Stripe, GitHub, or SendGrid need to POST to a public URL. Tunneling gives you one in seconds.
- Demoing in-progress work — Share a link to your local dev environment with a client or stakeholder.
- IoT and remote devices — Connect devices behind NAT to a central gateway without exposing them directly.
Tunneling tools handle the basic connectivity problem well. The weak spots come when you need security controls, observability, or team access policies on top of that connection.
What is an API Gateway?
An API gateway sits between clients and your backend services, acting as a single entry point that handles routing, authentication, rate limiting, and observability. Every request passes through the gateway before reaching your application.
When to use an API gateway
- Microservices — Route requests to the right service (
/users→ user-service,/orders→ order-service). - Authentication — Validate JWTs, API keys, or session tokens at the edge before they reach your origin.
- Rate limiting and abuse protection — Throttle clients before they overwhelm your backend.
Traditional API gateways require infrastructure: DNS setup, TLS certificates, load balancer configuration, and ongoing maintenance. Many are also expensive at scale, with per-request pricing that grows unpredictably.
What is Edge Computing?
Edge computing moves computation and data processing closer to where the request originates — geographically distributed points of presence instead of a single central server. For ingress and traffic management, this means TLS termination, routing decisions, and security policies execute at the network edge, reducing latency for end users.
When to use edge computing
- Global audiences — Users in Europe, Asia, and the Americas all get low-latency responses.
- Multi-region redundancy — If one region goes down, traffic routes to the next closest edge.
- WAF and DDoS mitigation — Inspect and filter traffic before it reaches your origin servers.
How They Compare
| Capability | Tunneling | API Gateway | Edge Computing |
|---|---|---|---|
| Expose localhost | ✓ | — | — |
| Request routing | — | ✓ | Partial |
| WAF & security | — | ✓ | ✓ |
| Global low-latency | — | — | ✓ |
| Identity-aware auth | — | ✓ | Sometimes |
| Traffic inspection | — | Basic logs | — |
| Request replay | — | — | — |
| Zero infrastructure | ✓ | Depends | Depends |
Why You Need All Three
In practice, modern applications need more than one of these capabilities across their lifecycle:
- Development: You need tunneling to share local work and test webhooks.
- Staging: You need an API gateway to enforce auth and route to multiple backend services.
- Production: You need edge computing for global performance, plus a WAF and observability.
The hard part is that these three capabilities traditionally come from three different vendors — a tunneling tool for dev, an API gateway for staging, and a CDN or edge platform for production. Each has its own configuration, its own pricing model, and its own team to manage.
Ngris: Tunneling + API Gateway + Edge, One Platform
Ngris was built to combine all three:
- Tunneling — One command exposes any local server with automatic TLS.
- API gateway — Per-endpoint routing, rate limiting, JWT validation, and identity-aware access with SSO/OIDC.
- Edge — Multi-region deployment with automatic route sync, WAF, live traffic inspection, and request replay.
You start with a tunnel in development, add gateway features as your service grows, and deploy to the edge when you go to production — all on the same platform, with the same configuration model, and a single pricing plan that doesn't charge per request.
Try it yourself
Install Ngris and expose your local server in one command:
ngris http 3000
No credit card required. Free plan includes 5 endpoints and 100k requests/month.
Summary
- Tunneling = secure connectivity from local to public. Best for dev, webhooks, and demos.
- API gateway = routing, auth, and rate limiting at the edge. Best for microservices and production APIs.
- Edge computing = global performance and security. Best for multi-region, low-latency, and DDoS protection.
- Ngris = all three in one platform, from dev to production.