Packages
baby
0.37.0
0.39.1
0.38.0
0.37.0
0.36.2
0.36.1
0.36.0
0.35.3
0.35.2
0.35.1
0.35.0
0.34.0
0.33.0
0.32.0
0.31.0
0.30.1
0.30.0
0.26.0
0.25.2
0.25.1
0.25.0
0.23.0
0.22.0
0.21.1
0.21.0
0.20.0
0.19.0
0.18.0
0.17.0
0.16.4
0.16.3
0.16.1
0.16.0
0.15.1
0.15.0
0.14.1
0.14.0
0.13.2
0.13.1
0.13.0
0.12.1
0.12.0
0.11.4
0.11.3
0.11.2
0.11.1
0.11.0
0.10.0
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
Bushbaby Automated Bamboo Yields
Current section
Files
Jump to
Current section
Files
README.md
# Baby
Bushbaby Automated Bamboo Yields
Sync for Bamboo stores using the [Bushbaby protocol](Bushbaby.md)
## Connection tuning
The per-connection idle timeout is governed by three settings, all read from
Application config (`config :baby, ...`) at connection startup:
* `:outrate` — milliseconds between outbox ticks. Default: a random prime
near 75 (jittered so connections don't tick in lockstep).
* `:max_spins` — idle budget, in outbox intervals, once the initial
replication sync has completed. Default: a random prime near 1200.
* `:bootstrap_spins` — idle budget while the initial sync is still in
progress, giving the peer time to compute its WANT list before being
dropped. Default: a random prime near 3000.
The idle counter resets on any send or receive, so the budgets measure
consecutive silence rather than wall-clock time on a busy link. A connection
that exceeds its budget is dropped and re-established on the next cryout.
To estimate wall-clock time, multiply the budget by `:outrate` — e.g. a
default `max_spins` of ~1193 at a default `outrate` of ~80ms is roughly 95
seconds, and a default `bootstrap_spins` of ~2969 is roughly 4 minutes.
```elixir
config :baby,
outrate: 100,
max_spins: 1200,
bootstrap_spins: 5000
```