Examples

Complete, production-ready configuration examples for common Sentinel use cases. Each example includes the full configuration file, setup instructions, and testing commands.

Quick Reference

ExampleUse CaseKey Features
Simple ProxyBasic reverse proxySingle upstream, health checks
API GatewayAPI managementVersioning, auth, rate limiting
API ValidationSchema validationOpenAPI specs, JSON Schema, contract enforcement
Load BalancerTraffic distributionMultiple backends, algorithms
Traffic MirroringCanary deploymentsShadow traffic, safe testing, sampling
Static SiteFile servingCaching, compression, SPA
MicroservicesService meshMulti-service routing
SecurityWAF + AuthAgents, protection layers
ObservabilityMonitoring stackPrometheus, Grafana, tracing
WebSocketReal-time appsWS proxying, inspection
AI GatewayLLM API proxyPrompt security, PII filtering

Getting Started

Each example follows this structure:

  1. Overview - What the example demonstrates
  2. Configuration - Complete sentinel.kdl file
  3. Setup - How to run the example
  4. Testing - Commands to verify it works
  5. Customization - Common modifications

Running Examples

All examples assume Sentinel is installed:

# Install Sentinel
cargo install sentinel-proxy

# Run with a configuration
sentinel -c sentinel.kdl

For examples using agents, install the required agents first:

# Example: Install WAF and auth agents
cargo install sentinel-agent-waf sentinel-agent-auth

Example Files

All configuration files in these examples are available in the sentinel-examples repository:

git clone https://github.com/raskell-io/sentinel-examples
cd sentinel-examples