Usage & Enterprise Capabilities
Key Benefits
- Unified Data Access: One gateway for all your GraphQL, REST, and gRPC services.
- Type-Safe Development: End-to-end type safety from the database to the frontend.
- Ultra-High Performance: Built with Go for low latency and high throughput.
- API Composition Mastery: Easily build complex, federated data layers.
- Enterprise Observability: Built-in metrics and logging for real-time visibility.
Production Architecture Overview
- WunderGraph Gateway: The main Go application running as a docker container.
- Upstream APIs: Your collection of GraphQL, REST, gRPC, and database services.
- Configuration Server: (Optional) for managing dynamic updates and federation.
- Metrics/Logging: Integration with Prometheus and OpenTelemetry for full-stack visibility.
- Reverse Proxy: NGINX or Caddy to handle SSL/TLS and routing.
Implementation Blueprint
Implementation Blueprint
Prerequisites
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start dockerDocker Compose Production Setup
version: '3'
services:
wundergraph:
image: wundergraph/wundergraph:latest
ports:
- "9991:9991"
environment:
- WG_NODE_URL=https://your.domain.com
- WG_PUBLIC_NODE_URL=https://your.domain.com
volumes:
- ./generated:/app/.wundergraph/generated
restart: always
prometheus: # Optional monitoring
image: prom/prometheus:latest
ports:
- "9090:9090"Kubernetes Production Deployment (Recommended)
# Deploy using WunderGraph's official Kubernetes manifests or Helm
kubectl create deployment wundergraph --image=wundergraph/wundergraph:latest
kubectl expose deployment wundergraph --port=9991- Horizontal Scaling: Scale your gateway pods automatically as your global API traffic increases.
- Secure Persistence: Use Kubernetes Secrets to manage your upstream API credentials and provider tokens.
- Zero-Downtime Reliability: Rolling updates for the gateway ensure that your unified API is always operational.
Scaling Strategy
- Stateless Gateway: The WunderGraph gateway itself is stateless; scale it by running multiple instances behind a layer 4 load balancer.
- Caching: Leverage WunderGraph's native edge caching to minimize latency for high-frequency API requests.
- Health Checks: Configure the gateway and your upstream services with health checks to ensure traffic only hits healthy endpoints.
- Rate Limiting: Implement WunderGraph middleware to protect your unified API from traffic spikes and DDoS attacks.
Backup & Safety
- Config Snapshots: Regularly backup your
.wundergraphconfiguration to avoid losing your API composition logic. - Secret Management: Never hardcode upstream API keys; use a secure vault or Kubernetes Secrets.
- HTTPS Everywhere: Always run WunderGraph behind a secure reverse proxy or use its native TLS support to force secure connections.
- Monitoring: Regularly audit OpenTelemetry traces to identify and resolve performance bottlenecks in your federated data layer.
Recommended Hosting for WunderGraph
For systems like WunderGraph, we recommend high-performance VPS hosting. Hostinger offers dedicated setups for open-source tools with one-click installer scripts and 24/7 priority support.
Get Started on HostingerExplore Alternative Tools Infrastructure
Kubernetes
Kubernetes is a production-grade, open-source platform for automating deployment, scaling, and operations of application containers.
Supabase
Supabase is the leading open-source alternative to Firebase. It provides a full backend-as-a-service (BaaS) powered by PostgreSQL, including authentication, real-time subscriptions, and storage.