Zero Learning Curve

Simple JSON Config

Clean. Declarative. Readable by anyone.
Configuration that fits in your head.

DeclarativeHot ReloadSecure Defaults

See the Difference

Traditional Approach (20+ lines)

vcl 4.1;

sub vcl_recv {
  if (req.http.Cookie) {
    set req.http.Cookie = regsuball(
      req.http.Cookie,
      "(^|;\s*)(__utm[a-z]+|_ga|_gid)=[^;]*",
      ""
    );
    if (req.http.Cookie ~ "^\s*$") {
      unset req.http.Cookie;
    }
  }
}

sub vcl_backend_response {
  if (beresp.status == 200) {
    set beresp.ttl = 1h;
    set beresp.grace = 24h;
  }
  if (beresp.http.Cache-Control ~ "no-cache") {
    set beresp.uncacheable = true;
  }
}

sub vcl_deliver {
  if (obj.hits > 0) {
    set resp.http.X-Cache = "HIT";
  } else {
    set resp.http.X-Cache = "MISS";
  }
}

• Custom scripting language

• Imperative logic

• Regex-based patterns

• Specialized knowledge required

Trident JSON (8 lines)

{
  "cache": {
    "default_ttl": "1h",
    "grace_period": "24h",
    "key": {
      "strip_cookies": ["__utm*", "_ga", "_gid"]
    }
  },
  "response_headers": {
    "x_cache": true
  }
}

• Standard JSON format

• Declarative config

• Readable patterns

• Any developer can read it

Why JSON Wins

📖

Readable by Anyone

Junior devs, ops teams, even managers can review and understand the config.

Zero Training
🔒

Secure by Default

Built-in cookie bypass, auth handling, and request smuggling prevention.

No CVE Risk
🔄

Hot Reload

Change config, save file, done. No restarts, no SIGHUP signals needed.

Instant Updates
✅

Validation on Load

Config errors caught immediately with clear error messages. No runtime surprises.

Fail Fast
📝

Git-Friendly

Simple diffs, easy code review. Compare to 500-line VCL changes.

Clean PRs
🚀

Faster Onboarding

New team members productive in minutes, not weeks of VCL training.

10x Faster

Real-World Examples

Stale-While-Revalidate

3 lines vs 25 lines
{
  "cache": {
    "grace_period": "24h"
  }
}
# Varnish VCL
sub vcl_hit {
  if (obj.ttl >= 0s) {
    return (deliver);
  }
  if (std.healthy(req.backend_hint)) {
    if (obj.ttl + obj.grace > 0s) {
      return (deliver);
    }
  }
  return (miss);
}

Cache Tags

Built-in & Ready
// Trident - Built-in cache tags
// Tags extracted from X-Cache-Tags header
// Purge via REST API:
curl -X POST /admin/purge/tag \
  -d '{"tag": "product:123"}'
# Traditional approach
# Often requires enterprise tier
# Or custom implementation
# Manual ban list management
# Additional complexity

Backend Health Checks

5 lines vs 15 lines
{
  "backends": [
    {
      "name": "origin",
      "host": "backend.example.com",
      "health_check_path": "/health",
      "health_check_interval": "5s"
    }
  ]
}
# Varnish VCL
probe health {
  .url = "/health";
  .interval = 5s;
  .timeout = 2s;
  .window = 5;
  .threshold = 3;
}
backend origin {
  .host = "backend.example.com";
  .probe = health;
}

Simpler AND Faster

You might think simple config means slower performance. Wrong. Trident's rules engine adds only 1.1% overhead vs 68.5% for equivalent VCL.

1.1%
Trident Rules Overhead
245K RPS with complex rules
68.5%
Varnish VCL Overhead
Same rules, more CPU

Complete Production Config

{
  "server": {
    "listen": "0.0.0.0:80",
    "admin_listen": "127.0.0.1:8080"
  },
  "cache": {
    "max_memory": "4GB",
    "default_ttl": "1h",
    "grace_period": "24h",
    "compression": {
      "enabled": true,
      "algorithm": "zstd",
      "level": 3
    },
    "coalesce": {
      "enabled": true,
      "timeout": "30s"
    },
    "stale_if_error": {
      "enabled": true,
      "max_stale_age": "1h",
      "status_codes": [500, 502, 503, 504]
    },
    "key": {
      "vary_headers": ["X-Customer-Group"],
      "strip_cookies": ["__utm*", "_ga", "_gid", "fbclid"],
      "normalize_query": true
    }
  },
  "backends": [
    {
      "name": "origin",
      "host": "backend.example.com",
      "port": 443,
      "tls": true,
      "health_check_path": "/health",
      "health_check_interval": "10s"
    }
  ],
  "logging": {
    "format": "json",
    "level": "info"
  }
}

Clear, structured JSON. Full production setup.

Equivalent Varnish VCL: 200+ lines

Start with Simple Configuration

Declarative JSON configuration is included in all Trident plans.