IsleDB / Docs / Deploy IsleDB

Deploy IsleDB

This page covers what to run for a database, how many of each, and what each needs. The pages for each service cover its settings, health checks and metrics in detail. To try IsleDB on one machine first, see Get started.

What you run

Service How many Keeps state? API Admin
isledb writer Exactly one per database No: everything is saved to the bucket before it answers :8070 127.0.0.1:8071
isledb reader As many as you need A disk cache it can rebuild :8080 127.0.0.1:8081
isledb maintenance Exactly one per database Scratch files it can rebuild none 127.0.0.1:8061
isledb cache Optional; one or more per region A disk cache it can rebuild :8090 127.0.0.1:8091

All four are the same program, isledb, started with the service's name. They share nothing but the bucket, so they can run anywhere that reaches it, in any order.

Get the program

The image runs as user 65532. Give that user write access to the volumes for a reader's cache, maintenance's scratch space and the read cache's disk; in Kubernetes, set securityContext.fsGroup: 65532.

Before you start

  1. A bucket. Create it as described in Set up object storage: versioning and soft delete off, no retention locks, and no lifecycle rules over the database's prefix.
  2. Storage credentials. Each service reads them from the provider's usual places: environment variables, shared config files, or the instance or pod role. The writer and maintenance need to read, write and delete objects under the database's prefix; readers and the read cache only read.
  3. Tokens. The writer, readers and read cache refuse to start without authentication. See Secure IsleDB.

Choose a layout

A small deployment. One writer, two readers behind a load balancer, and maintenance. Readers in the same region as the bucket read it directly.

Many readers. Add an isledb cache in each region with readers, and point the readers at it with read_cache.url. The bucket then sees reads from the caches instead of from every reader, and readers usually see new writes within a second.

From a Go program. A program that embeds IsleDB is the writer or a reader itself. A database still needs maintenance: run isledb maintenance against the same bucket and prefix, or open it in your program with DB.OpenMaintenance.

One configuration file

One YAML file can configure every service. Settings they share sit at the top; each service reads its own section and ignores the others':

bucket_url: s3://my-bucket?region=us-east-1
log_level: info

writer:
  prefix: prod/accounts
  auth:
    token_file: /etc/isledb/writer-tokens

reader:
  prefix: prod/accounts
  cache_dir: /var/cache/isledb
  auth:
    token_file: /etc/isledb/reader-tokens

maintenance:
  prefix: prod/accounts
  scratch_dir: /var/lib/isledb/scratch

Start each service with isledb <service> --config isledb.yaml. Any setting can also come from an environment variable or a flag; see the configuration reference. To check a file without starting anything, add --check: the service prints every setting with its final value, or what is wrong.

Health checks and traffic

Each service serves /healthz, /readyz and /metrics on its admin address, without authentication.

Rolling out a new version

Production checklist