Skip to content

Introduction & Features ​

What is Sweety ​

Sweety is a high-performance, multi-site web server written in Rust, aiming to combine Nginx-level deep configurability with Caddy-style out-of-the-box experience.

Core Features ​

Protocol Support ​

  • HTTP/1.1 — Keep-Alive, Pipeline
  • HTTP/2 — Multiplexing, Server Push (h2 over TLS)
  • HTTP/3 / QUIC — Based on quinn, shares the same port (443) with HTTP/2

TLS ​

  • Manual certificates (cert/key files)
  • ACME automatic certificates: Let's Encrypt / ZeroSSL / LiteSSL, supports HTTP-01 and DNS-01 validation
  • Multi-certificate (SNI routing, different certificates for different domains on the same port)
  • HSTS, TLS version/cipher suite control

Site Features ​

FeatureDescription
Static FilesIn-memory cache (≤ 64KB with pre-compressed gz/br/zst), fd cache, Range, sendfile(2) zero-copy, inotify eviction
FastCGI/PHPConnection pool, Unix socket/TCP, response cache
Reverse ProxyHTTP/1.1 + HTTP/2 upstream, connection pool, circuit breaker, load balancing
gRPC ProxyTransparent gRPC/gRPC-Web forwarding
WebSocketForward proxy WS/WSS
auth_requestSubrequest authentication (equivalent to Nginx auth_request)
Rate Limiting5-dimension token bucket (IP / path / IP+path / header / UA)
RewriteRegex URL rewriting (last / break / redirect / permanent)
Error PagesCustom error_pages
HTTPS Redirectforce_https = true

Out of the Box (Caddy-style Sugar Syntax) ​

  • preset = "wordpress" — One line to enable optimal WordPress location rules
  • php_fastcgi = "/tmp/php.sock" — One line to replace a full [sites.fastcgi] block
  • acme_email = "you@example.com" — One line to enable ACME automatic HTTPS

Operations ​

  • Hot Reload: sweety reload reloads config without dropping connections
  • Daemon Mode: sweety start/stop/restart
  • Config Validation: sweety validate (equivalent to nginx -t)
  • Prometheus Metrics: /metrics endpoint (planned for v0.5)
  • Admin REST API: health / stats / plugins available (/api/v1/*); site management and node control planned for v0.5

Comparison with Alternatives ​

SweetyNginxCaddy
LanguageRustCGo
HTTP/3✅ NativeRequires patch✅ Native
ACME Auto-Cert✅❌ (needs plugin)✅
Config FormatTOML/JSON/YAMLCustom syntaxCaddyfile/JSON
Hot Reload✅✅✅
WebSocket✅✅✅
gRPC Proxy✅✅ (full in Plus)✅
Memory Safety✅❌✅
Static File Memory Cache✅✅❌
FastCGI Response Cache✅✅❌

Released under the Apache License 2.0