Title here
Summary here
Start a tiny origin server:
mkdir -p /tmp/bouine-origin
printf 'hello from origin\n' > /tmp/bouine-origin/index.html
python3 -m http.server 3000 --directory /tmp/bouine-originCreate config.yaml:
listen:
http: ":8080"
admin: ":9000"
storage:
hot_max_bytes: 256Mo
upstream_pools:
- name: origin
targets: ["127.0.0.1:3000"]
routes:
- match: { path_prefix: / }
pool: origin
cache:
ttl_default: 60s
stale_while_revalidate: 10s
stale_if_error: 300sRun bouine:
bouine serve --config config.yaml --log-format jsonVerify caching:
curl -sI http://127.0.0.1:8080/ | grep X-Cache
# X-Cache: MISS
curl -sI http://127.0.0.1:8080/ | grep X-Cache
# X-Cache: HITCheck health and metrics:
curl -s http://127.0.0.1:9000/healthz
curl -s http://127.0.0.1:9000/readyz
curl -s http://127.0.0.1:9000/metrics | grep bouine_requests_totalX-Cache: HIT, and the access log included cache_status=HIT.bouine can serve files directly from a local directory — no need to run a separate HTTP server. See Static file serving for the full reference.
mkdir -p /tmp/bouine-static
printf 'hello from disk\n' > /tmp/bouine-static/index.htmlCreate config.yaml:
listen:
http: ":8080"
admin: ":9000"
routes:
- match: { path_prefix: / }
static:
root: /tmp/bouine-static
index: [index.html]Run bouine:
bouine serve --config config.yaml --log-format jsoncurl -sI http://127.0.0.1:8080/ | grep Content-Type
# Content-Type: text/html; charset=utf-8Static routes serve from disk on every request. The OS page cache handles
hot caching in RAM. To enable bouine’s cache layer (for cluster replication
or TTL-based eviction), set cache.enabled: true on the route.