IsleDB / Docs / Configuration reference
Configuration reference
Every setting of every IsleDB service. Guidance on choosing values is on each service's page: writer, reader, maintenance and read cache.
How settings work
Each setting can come from a YAML file, an environment variable or a flag. A flag overrides the environment, the environment overrides the file, and the file overrides the default.
isledb writer --config /etc/isledb/isledb.yaml
- One file for every service. Settings shared by all services sit at the
top; each service reads its own section (
writer:,reader:,maintenance:,cache:) and leaves the others alone. - Unknown keys are errors, at the top and inside a service's section, so a misspelled setting stops the service at start instead of being ignored.
- Environment variables are
ISLEDB_followed by the key, upper case, with dots as underscores:writer.flush.intervalisISLEDB_WRITER_FLUSH_INTERVAL, andbucket_urlisISLEDB_BUCKET_URL. A variable set to an empty value counts as set. - Sizes take binary units:
512KiB,256MiB,8GiB,2TiB. Durations look like250ms,30sor2m. --checkprints every setting with its final value, or the problems it found, and exits without starting the service.- No secrets in the configuration. It names files that hold tokens and keys; storage credentials come from the provider's usual places.
Shared settings
| Setting | Default | Description |
|---|---|---|
bucket_url--bucket-urlISLEDB_BUCKET_URL |
required | The bucket that holds the database. See Set up object storage. |
log_level--log-levelISLEDB_LOG_LEVEL |
info |
debug, info, warn or error. |
--configISLEDB_CONFIG |
The YAML file. |
Authentication, TLS and shutdown
The writer, reader and read cache share these settings, each under its own
section. Replace <service> with writer, reader or cache, and
<SERVICE> with WRITER, READER or CACHE.
| Setting | Default | Description |
|---|---|---|
<service>.auth.token_file--auth-token-fileISLEDB_<SERVICE>_AUTH_TOKEN_FILE |
File of accepted tokens, one per line. Reread on SIGHUP. |
|
<service>.auth.insecure--insecureISLEDB_<SERVICE>_AUTH_INSECURE |
false |
Accept requests without a token. For development only. |
<service>.tls.cert, <service>.tls.key--tls-cert, --tls-keyISLEDB_<SERVICE>_TLS_CERT, ISLEDB_<SERVICE>_TLS_KEY |
Serve HTTPS with this certificate and key. | |
<service>.tls.client_ca--tls-client-caISLEDB_<SERVICE>_TLS_CLIENT_CA |
Require clients to present a certificate signed by this CA. | |
<service>.shutdown_drain--shutdown-drainISLEDB_<SERVICE>_SHUTDOWN_DRAIN |
5s |
How long the service reports not ready before it shuts down, so load balancers stop sending it traffic. |
A service with an API refuses to start without a token file or a client CA,
unless auth.insecure is set. See Secure IsleDB.
Writer
| Setting | Default | Description |
|---|---|---|
writer.prefix--prefixISLEDB_WRITER_PREFIX |
required | The database's path in the bucket; / for the root of the bucket. |
writer.owner_id--owner-idISLEDB_WRITER_OWNER_ID |
host name | A name for this writer, shown in logs and storage. In Kubernetes, use the pod name. |
writer.flush.interval--flush-intervalISLEDB_WRITER_FLUSH_INTERVAL |
250ms; 1s on gs:// |
How often writes are saved. At least 1s on Google Cloud Storage. See Choose the flush interval. |
writer.writes.commit_wait--commit-waitISLEDB_WRITER_WRITES_COMMIT_WAIT |
10s |
How long a write waits to be saved before the client gets 504. Longer than flush.interval, and at most 20s. |
writer.values.max_key_bytes--max-key-bytesISLEDB_WRITER_VALUES_MAX_KEY_BYTES |
65527 |
Largest key accepted, in bytes. At most 65527. |
writer.values.max_value_bytes--max-value-bytesISLEDB_WRITER_VALUES_MAX_VALUE_BYTES |
16MiB |
Largest value accepted. |
writer.writes.max_request_bytes--max-request-bytesISLEDB_WRITER_WRITES_MAX_REQUEST_BYTES |
32MiB |
Largest batch request. At least 1MiB. |
writer.memtable.target_bytes--memtable-bytesISLEDB_WRITER_MEMTABLE_TARGET_BYTES |
16MiB |
How much data the writer buffers before saving it in a separate group. Also the largest batch. |
writer.memtable.max_pending--max-pending-memtablesISLEDB_WRITER_MEMTABLE_MAX_PENDING |
4 |
How many full groups can wait to be saved before new writes get 503. |
writer.l0_merge.target_bytes--l0-merge-bytesISLEDB_WRITER_L0_MERGE_TARGET_BYTES |
64MiB |
The writer keeps the files it recently saved in memory and combines them into one larger file once they hold this much. Uses up to about three times this much memory: twice this in saved files, and the combined file while it uploads. Smaller makes fewer recent files for a scan to read; larger means less rewriting. See Memory. |
writer.l0_merge.max_age--l0-merge-max-ageISLEDB_WRITER_L0_MERGE_MAX_AGE |
5m |
How long a saved file is kept in memory before what is kept is combined, whatever its size. |
writer.writes.max_inflight_bytes--max-inflight-bytesISLEDB_WRITER_WRITES_MAX_INFLIGHT_BYTES |
256MiB |
Memory for requests being read and applied at once. A PUT counts its body; a batch counts 4 times its body. Past it, new writes get 503 until earlier ones finish. At least 4 × max_request_bytes, and max_value_bytes. |
writer.writes.body_read_timeout--body-read-timeoutISLEDB_WRITER_WRITES_BODY_READ_TIMEOUT |
1m |
How long a client has to send its request body. Past it, the client gets 408. |
writer.change_feed.payload--change-feedISLEDB_WRITER_CHANGE_FEED_PAYLOAD |
empty | Turns on the database's change feed: keys or values. Empty keeps what the database has. Once on, it stays on, and its mode can't change. |
writer.policy.max_pinned_view_age--max-pinned-view-ageISLEDB_WRITER_POLICY_MAX_PINNED_VIEW_AGE |
1h |
Must match the database's setting. Leave it unset unless the database was created with a different value; otherwise the writer won't start. |
writer.listen--listenISLEDB_WRITER_LISTEN |
:8070 |
Address for the API. |
writer.admin_listen--admin-listenISLEDB_WRITER_ADMIN_LISTEN |
127.0.0.1:8071 |
Address for health checks and metrics. Empty turns it off. |
Reader
| Setting | Default | Description |
|---|---|---|
reader.prefix--prefixISLEDB_READER_PREFIX |
required | The database to read; / for the root of the bucket. |
reader.cache_dir--cache-dirISLEDB_READER_CACHE_DIR |
required | This replica's disk cache. Give each replica its own. |
reader.caches.disk_bytes--disk-cache-bytesISLEDB_READER_CACHES_DISK_BYTES |
8GiB |
Disk cache budget. Must be positive. |
reader.caches.block_bytes--block-cache-bytesISLEDB_READER_CACHES_BLOCK_BYTES |
256MiB |
In-memory cache of data. Must be positive. |
reader.caches.bloom_bytes--bloom-cache-bytesISLEDB_READER_CACHES_BLOOM_BYTES |
64MiB |
In-memory cache of the filters that skip files without a key. Must be positive. |
reader.views.refresh_after--refresh-afterISLEDB_READER_VIEWS_REFRESH_AFTER |
1s |
How often new data is loaded. At least 1s. |
reader.reads.max_concurrent--max-concurrent-readsISLEDB_READER_READS_MAX_CONCURRENT |
256 |
Reads served at once; past it, reads get 503. |
reader.read_cache.url--read-cache-urlISLEDB_READER_READ_CACHE_URL |
An isledb cache to read through. |
|
reader.read_cache.token_file--read-cache-token-fileISLEDB_READER_READ_CACHE_TOKEN_FILE |
The token to send the cache: one token on a line of its own. Read at start; restart the reader after changing it. | |
reader.read_cache.ca_file--read-cache-ca-fileISLEDB_READER_READ_CACHE_CA_FILE |
CA certificates for a cache with a private CA. Empty trusts the system's CAs. Needs an https:// URL. |
|
reader.read_cache.cert, reader.read_cache.key--read-cache-cert, --read-cache-keyISLEDB_READER_READ_CACHE_CERT, ISLEDB_READER_READ_CACHE_KEY |
A client certificate for a cache that requires one. Set both. | |
reader.listen--listenISLEDB_READER_LISTEN |
:8080 |
Address for the API. |
reader.admin_listen--admin-listenISLEDB_READER_ADMIN_LISTEN |
127.0.0.1:8081 |
Address for health checks and metrics. Empty turns it off. |
Maintenance
| Setting | Default | Description |
|---|---|---|
maintenance.prefix--prefixISLEDB_MAINTENANCE_PREFIX |
required | The database to maintain; / for the root of the bucket. |
maintenance.scratch_dir--scratch-dirISLEDB_MAINTENANCE_SCRATCH_DIR |
the user's cache directory | Where compaction keeps the files it is merging. Use a local disk. |
maintenance.change_feed.retain_for--change-feed-retain-forISLEDB_MAINTENANCE_CHANGE_FEED_RETAIN_FOR |
0s |
How long change-feed history is kept; 0s keeps it all. |
maintenance.compaction.base_level_bytes--base-level-bytesISLEDB_MAINTENANCE_COMPACTION_BASE_LEVEL_BYTES |
512MiB |
Target size of the first level below newly saved files. Each level after it is level_growth times larger. See Tune compaction. |
maintenance.compaction.level_growth--level-growthISLEDB_MAINTENANCE_COMPACTION_LEVEL_GROWTH |
8 |
How much larger each level is than the one above it. At least 2. |
maintenance.compaction.target_sst_bytes--target-sst-bytesISLEDB_MAINTENANCE_COMPACTION_TARGET_SST_BYTES |
64MiB |
Size of the files compaction writes. |
maintenance.compaction.l0_to_base_ratio--l0-to-base-ratioISLEDB_MAINTENANCE_COMPACTION_L0_TO_BASE_RATIO |
1 |
How much newly saved data collects, as a share of the first level, before it is merged into that level. Higher rewrites less, but leaves more files for a scan to read. Must be positive. |
maintenance.compaction.l0_max_depth--l0-max-depthISLEDB_MAINTENANCE_COMPACTION_L0_MAX_DEPTH |
16 |
Newly saved files a single key may be in before they are merged into the first level, whatever their size. Bounds the files a read checks. |
maintenance.compaction.l0_max_age--l0-max-ageISLEDB_MAINTENANCE_COMPACTION_L0_MAX_AGE |
30m |
Age of the oldest newly saved data that makes it merge into the first level, whatever its size, so a database that stops being written settles. |
maintenance.admin_listen--admin-listenISLEDB_MAINTENANCE_ADMIN_LISTEN |
127.0.0.1:8061 |
Address for health checks and metrics. Empty turns it off. |
maintenance.shutdown_drain--shutdown-drainISLEDB_MAINTENANCE_SHUTDOWN_DRAIN |
0s |
How long to report not ready before stopping. |
Maintenance serves no API, so listen, auth and tls don't apply to it:
setting them is an error.
Read cache
| Setting | Default | Description |
|---|---|---|
cache.databases[].prefix--db (repeat)ISLEDB_CACHE_DATABASES (comma-separated) |
required | The databases served, by prefix; / for the root of the bucket. On the command line or in the environment, the list replaces the file's. |
cache.databases[].current_poll |
cache.current.poll |
How often this database is checked for new writes. |
cache.disk.dir--disk-dirISLEDB_CACHE_DISK_DIR |
required | Where cached data is kept, on local disk. One cache per directory. |
cache.disk.bytes--disk-bytesISLEDB_CACHE_DISK_BYTES |
required | Disk budget. |
cache.reads.max_bytes--max-read-bytesISLEDB_CACHE_READS_MAX_BYTES |
256MiB |
Bytes read from storage at once. At least 4MiB. |
cache.reads.max_wait--max-read-waitISLEDB_CACHE_READS_MAX_WAIT |
5s |
Longest a storage read waits for its turn. About half the readers' timeout to the cache. |
cache.current.poll--current-pollISLEDB_CACHE_CURRENT_POLL |
500ms |
How often each database is checked for new writes. |
cache.current.long_poll--long-pollISLEDB_CACHE_CURRENT_LONG_POLL |
30s |
Longest a reader's wait for new writes is held. At most 30s. |
cache.listen--listenISLEDB_CACHE_LISTEN |
:8090 |
Address for the API. |
cache.admin_listen--admin-listenISLEDB_CACHE_ADMIN_LISTEN |
127.0.0.1:8091 |
Address for health checks and metrics. Empty turns it off. |