back
Ambrosia
Elixir · OTP · Ranch · Prometheus · Docker
status:active
ref:SYS-03
size:—

Fault-tolerant Gemini protocol server written in Elixir. Built on OTP supervision trees for high-uptime capsule hosting on Geminispace.

Each connection runs in its own supervised process via Ranch. If one crashes, others continue serving. The supervision tree manages telemetry, rate limiting via token bucket, connection tracking, the TCP acceptor pool, and a Prometheus metrics exporter.

Security is layered: multiple path traversal protections, rate limiting, URL length limits and sanitisation, connection caps and timeouts. Only serves .gmi and .gemini files. The codebase includes testing against common attack patterns for the filesystem. TLS only, no plaintext, because it is Gemini.

Runs comfortably on a Raspberry Pi at 75-100MB memory with 1000 concurrent connections. Docker deployment with automatic certificate generation, or build a release from source.

Preproduction. Extensive test coverage for path traversal, rate limiting, concurrent connections, request parsing, and edge cases, but further work needed before production use.

— —