[server]
# Addresses the XRPC server listens on. When using as an env var, comma-separated.
#
# Can also be specified via environment variable `BOBBIN_BIND`.
#
# Default value: ["127.0.0.1:8090", "[::1]:8090"]
#binds = ["127.0.0.1:8090", "[::1]:8090"]
# The amount of time in seconds to allow in-flight requests to drain after sigterm
# before forcing the listener closed.
#
# Can also be specified via environment variable `BOBBIN_SHUTDOWN_GRACE_SECS`.
#
# Default value: 30
#shutdown_grace_secs = 30
# Address for the `/debug/mem` and `/debug/heap` introspection endpoints,
# for example `127.0.0.1:8091`. Empty disables them so the debug surface is
# never reachable on the public listener. Bind to loopback only.
#
# Can also be specified via environment variable `BOBBIN_DEBUG_BIND`.
#
# Default value: ""
#debug_bind = ""
# Reverse proxies in front of bobbin,
# each a bare IP address without a port or a CIDR block such as `173.245.48.0/20`.
# Bobbin will read the client address out of `x-forwarded-for`
# and forward that one address to the knot
# when a request arrives from a proxy on this list,
# so a knot that lists bobbin under its own `xrpc.trusted_proxies`
# can rate-limit per browser
# instead of pooling everyone bobbin serves into a single bucket.
# Bobbin will read the last 32 entries of the chain, at most.
# Leave empty when bobbin takes connections directly,
# since bobbin would otherwise believe a header any client can write.
# When using as an env var, comma-separated.
#
# Can also be specified via environment variable `BOBBIN_TRUSTED_PROXIES`.
#
# Default value: []
#trusted_proxies = []
# Exact browser origins allowed to call XRPC, or `*` for every origin.
# Empty disables CORS. When using as an env var, comma-separated.
# `*` cannot be combined with exact origins.
#
# Can also be specified via environment variable `BOBBIN_CORS_ORIGINS`.
#
# Default value: []
#cors_origins = []
[hydrant]
# Base URL of the hydrant instance - the cursor-replayable /stream lives
# under this. Use `ws://` or `wss://` - `http://` and `https://`
# are rewritten to the corresponding ws scheme at connection time!
#
# Can also be specified via environment variable `BOBBIN_HYDRANT_URL`.
#
# Default value: "http://127.0.0.1:13010"
#url = "http://127.0.0.1:13010"
# The cursor to request on first connect. Reconnects ignore this and resume
# strictly after the last cursor seen internally.
#
# Can also be specified via environment variable `BOBBIN_START_CURSOR`.
#
# Default value: 0
#start_cursor = 0
[ingest]
# Concurrent in-flight resolves during ingest. One slot per slingshot rtt.
# Default 16 sits at the measured throughput
# knee for cold replay against a healthy hydrant. The committer stays
# serial so that like, cursor and Spur allocation order are preserved.
#
# Can also be specified via environment variable `BOBBIN_INGEST_PARALLELISM`.
#
# Default value: 16
#parallelism = 16
# Events processed before a quiet stream may promote coverage to ready.
# The invite listings will be `503 Warming` while a quiet stream is under
# said count.
#
# Can also be specified via environment variable `BOBBIN_INGEST_IDLE_PROMOTE_MIN_EVENTS`.
#
# Default value: 256
#idle_promote_min_events = 256
# How many repos look up their ticket openers at once. A backfilled ticket
# only names its latest editor, so the mirror is the only way to learn who opened it.
#
# Can also be specified via environment variable `BOBBIN_INGEST_AUTHOR_FILL_CONCURRENCY`.
#
# Default value: 8
#author_fill_concurrency = 8
# Seconds to keep retrying an unreachable mirror. A starting bobbin waits this
# long at most, then goes ready with each ticket's latest editor as its author.
#
# Can also be specified via environment variable `BOBBIN_INGEST_AUTHOR_FILL_MAX_WAIT_SECS`.
#
# Default value: 30
#author_fill_max_wait_secs = 30
# How many search docs can wait for their ticket's opener. Past this cap they
# index under the latest editor, so a mirror outage can't use unbounded memory.
#
# Can also be specified via environment variable `BOBBIN_INGEST_AUTHOR_HELD_DOCS_MAX`.
#
# Default value: 20000
#author_held_docs_max = 20000
# What to do with a record past its lexicon's limits: `enforce` rejects it,
# `log` indexes it and warns, `off` doesn't check. `log` shows what `enforce`
# would drop before turning it on.
#
# Can also be specified via environment variable `BOBBIN_INGEST_VALIDATE`.
#
# Default value: "enforce"
#validate = "enforce"
[backpressure]
# Estimated peak transient anonymous bytes a single hydrating request holds:
# roughly the page of decoded records plus its serialized copy. Combined with
# the detected cgroup memory limit to size the in-flight cap on heavy
# endpoints. Has no effect when no cgroup memory limit is present, the heavy
# path stays unbounded exactly as before.
#
# Can also be specified via environment variable `BOBBIN_BACKPRESSURE_PER_REQUEST_ANON_BYTES`.
#
# Default value: 2097152
#per_request_anon_bytes = 2097152
# How often the adaptive watcher samples memory.current/memory.max and
# adjusts the in-flight cap. Ignored when no cgroup memory limit is present.
#
# Can also be specified via environment variable `BOBBIN_BACKPRESSURE_ADJUST_INTERVAL_MS`.
#
# Default value: 500
#adjust_interval_ms = 500
# memory.current/memory.max ratio below which the watcher additively raises
# the in-flight cap back toward its ceiling. Sits below the memory.high
# throttle band so the kernel, not this loop, handles mild pressure.
#
# Can also be specified via environment variable `BOBBIN_BACKPRESSURE_RELIEVE_BELOW_RATIO`.
#
# Default value: 0.85
#relieve_below_ratio = 0.85
# memory.current/memory.max ratio above which the watcher multiplicatively
# cuts the in-flight cap and purges jemalloc arenas. Set above the memory.high
# watermark so this loop acts as the anti-OOM backstop, not a duplicate throttle.
#
# Can also be specified via environment variable `BOBBIN_BACKPRESSURE_TIGHTEN_ABOVE_RATIO`.
#
# Default value: 0.92
#tighten_above_ratio = 0.92
# Bytes held back for the edge index, state indexes, and other derived
# state that grows after startup. Folded into the heavy-request reserve so
# the static in-flight cap leaves the index room to fill. Has no effect when
# no cgroup memory limit is present.
#
# Can also be specified via environment variable `BOBBIN_BACKPRESSURE_RESERVED_INDEX_BYTES`.
#
# Default value: 67108864
#reserved_index_bytes = 67108864
[slingshot]
# Base URL of a slingshot instance. Used for record bodies and identity.
#
# Can also be specified via environment variable `BOBBIN_SLINGSHOT_URL`.
#
# Default value: "http://127.0.0.1:13011"
#url = "http://127.0.0.1:13011"
[service_auth]
# Can also be specified via environment variable `BOBBIN_SERVICE_DID`.
# Required! This value must be specified.
#did =
[record_cache]
# Bound of bytes on the in-process record LRU. Records evict on a weighted
# LRU policy keyed on URI plus payload length.
#
# Can also be specified via environment variable `BOBBIN_RECORD_LRU_BYTES`.
#
# Default value: 67108864
#lru_bytes = 67108864
[search]
# The heap size in bytes for the in-mem tantivy writer. Larger values
# trade RAM for fewer segment merges - the index itself lives in
# `RamDirectory` and is rebuilt from hydrant replay on every restart.
#
# Can also be specified via environment variable `BOBBIN_SEARCH_HEAP_BYTES`.
#
# Default value: 50000000
#heap_bytes = 50000000
[codesearch]
# Origin of a zoekt-webserver with its JSON api enabled.
# Unset disables `org.tangled.temp.search.searchCode`.
#
# Can also be specified via environment variable `BOBBIN_CODESEARCH_ZOEKT_URL`.
#zoekt_url =
# basic auth credentials in `user:pass` format for the zoekt origin.
# unset sends requests without authorization.
#
# Can also be specified via environment variable `BOBBIN_CODESEARCH_ZOEKT_AUTH`.
#zoekt_auth =
[mirror]
# Origin of the knotmirror XRPC server.
#
# Can also be specified via environment variable `BOBBIN_MIRROR_URL`.
#url =
# failures in a row before requests to the mirror stop for the cooldown
# and answer `knot circuit breaker open` straight away.
#
# Can also be specified via environment variable `BOBBIN_MIRROR_BREAKER_THRESHOLD`.
#
# Default value: 3
#breaker_threshold = 3
# seconds requests to the mirror stay stopped after the breaker opens.
#
# Can also be specified via environment variable `BOBBIN_MIRROR_BREAKER_COOLDOWN_SECS`.
#
# Default value: 30
#breaker_cooldown_secs = 30
[moderation]
# DID of the labeler whose moderation decisions bobbin ingests. It is
# trusted as configured, so label signatures aren't verified.
#
# Can also be specified via environment variable `BOBBIN_MODERATION_LABELER_DID`.
#labeler_did =
# Origin of the labeler service (ozone).
#
# Can also be specified via environment variable `BOBBIN_MODERATION_LABELER_URL`.
#labeler_url =
[log]
# Log emitter format. `text` produces human-readable output for local
# development. `json` emits one structured object per line for log
# shippers in production.
#
# Can also be specified via environment variable `BOBBIN_LOG_FORMAT`.
#
# Default value: "text"
#format = "text"
# `tracing-subscriber` env-filter directive. Defaults to `info` across
# every span - override with `BOBBIN_LOG=bobbin_xrpc=debug,info` etc.
#
# Can also be specified via environment variable `BOBBIN_LOG`.
#
# Default value: "info"
#filter = "info"
[otlp]
# base url of an otlp/http collector for logs and metrics.
# unset disables opentelemetry export.
#
# Can also be specified via environment variable `BOBBIN_OTLP_ENDPOINT`.
#endpoint =
# basic auth credentials in `user:pass` format for the collector.
# unset sends requests without authorization.
#
# Can also be specified via environment variable `BOBBIN_OTLP_AUTH`.
#auth =
# service name reported in otlp resource attributes.
#
# Can also be specified via environment variable `BOBBIN_OTLP_SERVICE_NAME`.
#
# Default value: "bobbin"
#service_name = "bobbin"
[posthog]
# project api key for posthog analytics.
# empty disables analytics export.
#
# Can also be specified via environment variable `BOBBIN_POSTHOG_API_KEY`.
#
# Default value: ""
#api_key = ""
# ingestion host for posthog events.
#
# Can also be specified via environment variable `BOBBIN_POSTHOG_HOST`.
#
# Default value: "https://eu.i.posthog.com"
#host = "https://eu.i.posthog.com"
# environment tag attached to exported posthog events.
#
# Can also be specified via environment variable `BOBBIN_POSTHOG_ENV`.
#
# Default value: "dev"
#environment = "dev"