Administration

Administration overview

What an administrator of Raft DB looks after, which programs are involved, and a map from each task to the page that covers it.

A Raft DB installation is one to three kinds of process.

ProcessNeeded forLooked after by
raftdb-serverAlways. It owns the data.You, the watcher, systemd or a startup task.
raftdb-mysqlSQL clients (MySQL and MariaDB protocols). One process per dialect.You. There is no installer for it.
raftdb-watchHealth checks, automatic restarts, notifications, and (in a cluster) failover and resource control.You and systemd.

What the administrator does#

TaskPage
Choose and change settingsConfiguration reference
Find out what is happeningLogs and tracing, Monitoring with the watcher
Know what is on diskData directory layout, Write-ahead log and checkpoints
Keep copiesBackup and recovery
Manage databases, tables and accounts over HTTPHTTP administration API
Change MySQL server variablesSystem variables
Replace a binaryUpgrades
Start at bootRunning as a service
Make it faster or lighterResource use and tuning
Know the hard limitsLimits

Principles the design follows#

  • A basic server needs no options. raftdb-server with no arguments is a secure single server: loopback only, an admin password generated on the first start.
  • Every setting has one name on the command line, in the environment and in the file. A name that does not exist is an error.
  • Writes are on disk before they are acknowledged. Stopping or killing the process loses nothing that was acknowledged.
  • The server does not decide who is primary. In a cluster the watcher quorum does; the server keeps a fence.
  • The watcher never deletes or edits data. It runs only the commands you configure.

What an administrator must plan for#

  • TLS only on the SQL front-ends' client connections. Keep the other ports on loopback or a private network, or use a tunnel (Security).
  • No backup tool. Plan file copies of a stopped server or replica.
  • No file lock. Never start two servers on one data directory.
  • A checkpoint on demand makes a table unavailable while it runs.
  • Isolation between SQL sessions is per table (a writer holds its tables until the end of its transaction; no snapshot reads).

See also#