Sign inSign up

routechnology/scarlet

By routechnology

Updated 6 months ago

Scarlet is a protocol-agnostic database proxy/routing runtime.

Image
Networking
Developer tools
Databases & storage
0

142

routechnology/scarlet repository overview

Scarlet

Logo

Scarlet is a protocol-agnostic database proxy/routing runtime. It combines connection pooling, topology-aware routing, failover handling, operational admin surfaces, and query/runtime introspection behind a single runtime.

Current Scope

Scarlet currently provides:

  • Generic runtime infrastructure for multi-protocol proxying
  • A PostgreSQL frontend/backend protocol adapter
  • Session pooling and transaction pooling
  • Read/write routing across primary, replica, and auto-detected hosts
  • Health checks, lag-aware replica gating, ban/unban, and drain/undrain
  • Read-only fallback to primary before query bytes are sent
  • Dynamic databases for tenant-style deployments
  • PostgreSQL auth modes including Trust, Plain, Md5, Scram, Passthrough, and Cert
  • Auth query caching and auth-query connection invalidation
  • Session state tracking and replay needed for transaction pooling handoff
  • Prepared statement/runtime counters and prepared cache introspection
  • Two admin surfaces:
    • PostgreSQL-wire admin database
    • Token-protected HTTP admin API

Docker

Build the container:

docker build -t scarlet .

Run it with a mounted config:

docker run --rm \
  -p 56432:56432 \
  -p 8080:8080 \
  -v "$PWD/scarlet.toml:/etc/scarlet/scarlet.toml:ro" \
  scarlet --config /etc/scarlet/scarlet.toml

The image exposes ports 56432 and 8080.

Docker Compose

Create a docker-compose.yml:

services:
  scarlet:
    image: routechnology/scarlet:beta
    ports:
      - "56432:56432"
      - "8080:8080"
    volumes:
      - ./scarlet.toml:/etc/scarlet/scarlet.toml:ro
    command: --config /etc/scarlet/scarlet.toml
    restart: unless-stopped

Then run:

docker compose up -d

View logs:

docker compose logs -f scarlet

Stop:

docker compose down

Github

This repo will be made public soon - Scarlet Repo

Tag summary

Content type

Image

Digest

sha256:6ddda0dfb

Size

10.5 MB

Last updated

6 months ago

docker pull routechnology/scarlet:beta-ReleaseFast-amd64