nandi/gleanpublic Fork
⑂ 863259c
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Update the Modal readme for scale-to-zero

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandithebull committed 2026-09-21T19:11:38-07:00 Browse files
863259c parent: 49c0781
modified deploy/modal/readme.md +7 -5
@@ -44,9 +44,10 @@ running its exit handler, up to five minutes of writes are gone. Lower
4444 `max_containers=1` is not tuning, it is a correctness requirement. Two
4545 containers would mean two SQLite writers over two independent copies of the
4646 data, and the Volume's last-write-wins semantics would silently discard one of
47-them. `min_containers=1` keeps that container alive because Glean's background
48-workers — the Jetstream websocket consumer and the PDS sync / clustering /
49-feed-fetch loops — only run while a container exists.
47+them. `min_containers=0` lets that container scale to zero when idle. Glean's
48+background workers — the Jetstream websocket consumer and the PDS sync /
49+clustering / feed-fetch loops — only run while a container exists, so they
50+pause once it scales down and resume when the next request wakes one.
5051
5152 ## Secrets
5253
@@ -75,8 +76,9 @@ Modal's model is autoscaling ephemeral containers. Glean is a stateful,
7576 single-writer, always-on server. The mismatch is real and this deployment
7677 manages it rather than resolving it:
7778
78-- **One container, always warm.** No horizontal scaling; `min_containers=1`
79- means you pay for an idle container rather than scaling to zero.
79+- **One container, scaled to zero when idle.** No horizontal scaling, and
80+ with `min_containers=0` the first request after an idle period pays a cold
81+ start while the background workers are stopped in between.
8082 - **Snapshot durability, not continuous durability.** See the window above.
8183 - **Container churn costs data.** Any restart that skips the exit handler — a
8284 hard kill, an OOM, a preemption — loses the interval.
@@ -44,9 +44,10 @@ running its exit handler, up to five minutes of writes are gone. Lower
44 `max_containers=1` is not tuning, it is a correctness requirement. Two44 `max_containers=1` is not tuning, it is a correctness requirement. Two
45 containers would mean two SQLite writers over two independent copies of the45 containers would mean two SQLite writers over two independent copies of the
46 data, and the Volume's last-write-wins semantics would silently discard one of46 data, and the Volume's last-write-wins semantics would silently discard one of
47-them. `min_containers=1` keeps that container alive because Glean's background47+them. `min_containers=0` lets that container scale to zero when idle. Glean's
48-workers — the Jetstream websocket consumer and the PDS sync / clustering /48+background workers — the Jetstream websocket consumer and the PDS sync /
49-feed-fetch loops — only run while a container exists.49+clustering / feed-fetch loops — only run while a container exists, so they
50+pause once it scales down and resume when the next request wakes one.
50 51
51 ## Secrets52 ## Secrets
52 53
@@ -75,8 +76,9 @@ Modal's model is autoscaling ephemeral containers. Glean is a stateful,
75 single-writer, always-on server. The mismatch is real and this deployment76 single-writer, always-on server. The mismatch is real and this deployment
76 manages it rather than resolving it:77 manages it rather than resolving it:
77 78
78-- **One container, always warm.** No horizontal scaling; `min_containers=1`79+- **One container, scaled to zero when idle.** No horizontal scaling, and
79- means you pay for an idle container rather than scaling to zero.80+ with `min_containers=0` the first request after an idle period pays a cold
81+ start while the background workers are stopped in between.
80 - **Snapshot durability, not continuous durability.** See the window above.82 - **Snapshot durability, not continuous durability.** See the window above.
81 - **Container churn costs data.** Any restart that skips the exit handler — a83 - **Container churn costs data.** Any restart that skips the exit handler — a
82 hard kill, an OOM, a preemption — loses the interval.84 hard kill, an OOM, a preemption — loses the interval.