Administration

Limits

The hard limits and design limits of Raft DB: names, sizes, connections, protocol and HTTP limits, SQL limits, replication limits and the things the design does not do.

Each limit below comes from a constant or a rule in the code or a decision record. Limits that are by design of the current stage are marked (stage) and may go away.

Names#

ItemLimit
Database and table names (native API and HTTP)1 to 64 characters of letters, digits, _ and -.
Database and table names through the SQL front-endAnything MySQL allows (spaces, accents, $), up to 64 characters, not ending in a space; not ., /, \ or control characters. Stored encoded; the engine's limit is 255 bytes. Names starting __rdb_, __tmp or __u_ are the front-end's own and refused.
Default tablesmain and main.documents cannot be dropped or renamed.

Sizes#

ItemLimit
A wire frame of the binary protocol16 MiB (MAX_FRAME).
A WAL record1 byte to 16 MiB.
HTTP request body, headers1 MiB, 16 KiB.
A result page over HTTP10,000 documents (maxResultPage).
A UDP message16 datagrams (about 22 KB) in v2; more is TOO_BIG and the client uses TCP. A reply cache of 512 KB per UDP session.
DECIMALup to 65 digits.
Shards per tablethe shards setting, the same for all tables of a server; no resharding.
Table groups1 to 64.
Partitions of a partitioned table1 to 256 (MAX_PARTITIONS).
RowsNo fixed limit; the memory engine is limited by RAM.

Connections#

ItemLimit
Client connections to raftdb-mysqlmax_connections, default 500; one more gets error 1040.
Login time10 seconds.
Shared connections of the front-end to the serverraftdb_connections 0 to 64.
Connections to raftdb-serverNo fixed limit, but two threads each and no poller (stage): do not expect hundreds of thousands.
HTTP session token8 hours. A credential that passed the full password check is cached for 10 minutes (1,024 entries).
Prepared statements per session16,382; the next is error 1461.

SQL front-end#

ItemLimit
Views over views16 levels, then error 1462.
Foreign-key cascade15 levels deep, then error 3008.
A stored routine callStopped after 50 million statements and loop turns; recursion refused unless max_sp_recursion_depth allows it.
TransactionsAtomic and durable at commit, isolated one table at a time (READ-COMMITTED).
Character setStatements must be valid UTF-8.
CollationCase-insensitive comparison only; a binary or case-sensitive COLLATE is refused. Accents are distinguished: é is not e (MySQL's default collation equates them).
Unsupported statementsError 1235; see What is not there yet.

Storage and operations#

ItemLimit
CheckpointNot while serving; on demand it makes the table unavailable.
Compaction of the memory engine's logAt start or on demand only.
Restart time (memory engine)Proportional to the log's size (about 3.2 million records a second).
Data directoryOne server process only; no lock file.
IndexesTop-level fields on the native API (multi-field, nested and array indexes are not built); the SQL front-end builds composite and functional indexes of its own. Rebuilt at open.
BackupNo tool, no point-in-time recovery.

Cluster#

ItemLimit
Watchers in a quorumThree or more, on separate machines. A single watcher cannot fail over.
Failover timeAbout fail_after + 2 x lease + margin: about 12 seconds with the defaults (lease 3 s), 8.5 to 11 s measured with a 3 s lease, 6 to 8 s with a 1.5 s lease in tests.
Primary for a groupOne at a time. One decree at a time across all groups.
Changing the number of groups on a running clusterNot supported.
raftdb-server accountsGiven by user and token settings, not stored and not replicated: every node needs the same lines.
Reads from followers with table groupsRequests for a table led elsewhere are forwarded, never served from a follower.

See also#