~james/core

core/bobbin/example.toml -rw-r--r-- 10.3 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 14 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
[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"