Blixt Documentation v2.11

The embedded database

The single-node images start their own database server inside the container and keep its files in the data directory, under index/{postgres|sqlite}. You don’t need to install or manage anything. The Helm chart includes a database server.

The index lives on the data volume rather than inside the container, so it survives a restart and an upgrade to a new image.

Using your own PostgreSQL

For production, especially for scale-out, a managed PostgreSQL service such as Cloud SQL, Amazon RDS or Azure Database for PostgreSQL gives you backups and failover without extra work.

  1. Create a database and a user for BlixtFS. For example, in psql:

    CREATE USER bfs WITH PASSWORD 'choose-a-password';
    CREATE DATABASE bfs OWNER bfs;
    
  2. Point BlixtFS at it:

    database:
      type: postgres
      host: db.example.internal
      port: 5432
      name: bfs
      username: bfs
      connections: 25
    

    Pass the password as DATABASE_PASSWORD rather than writing it in the file. In the Helm chart, set postgres.enabled=false and fill in externalDatabase.*.

  3. Start BlixtFS. It creates its tables on first start, and on later upgrades it applies any schema change the new release needs. See Schema versions.

Connection limits

Each BlixtFS server opens up to database.connections connections (25 by default). Make sure the database’s max_connections is larger than the total across all servers, with headroom for administration. When the database runs out of connections, file operations fail.

Other databases

BlixtFS also supports MySQL, SQLite and Google Cloud Spanner for the metadata index. See Databases for when each is appropriate.