Skip to content

Limits

Hard numbers first, then the behavioral boundaries. Every value here is enforced in code, not aspirational.

Size and structural limits

LimitValueBehavior at the boundary
Wire frame (request or response)16 MiBoversized request → connection closed; oversized result set → truncated response with skipNext
BSON document nesting200 levelsdecoder, encoder, and JSON parser all reject deeper
Encoded index key512 bytesdocument is skipped by that index (counted in docsSkipped), still found by scans
B+Tree page4096 bytesfixed at build time
Index entry value64 bytesinternal cap (offsets are 8 bytes)
Collection name128 chars, [A-Za-z0-9_][A-Za-z0-9_-]*BadRequest
Client-side find reassembly (Prairie/Rust client)10,000 docshard stop to protect the UI
Concurrent connections64 (configurable)ServerBusy frame, then close
History entries (bisonsh)1000oldest trimmed

Type-level limits

  • Indexable types: Null, numbers, String, ObjectId, Bool, DateTime. Documents, arrays, Decimal128, and NaN are not indexable — affected documents are skipped by that index.
  • Numbers in index keys normalize to double: integers beyond 2⁵³ may compare equal to neighbors inside an index. The matcher itself compares exactly.
  • Decimal128 is storage + display only (full string conversion, no arithmetic).
  • _id must be an ObjectId (auto-generated when absent) and is the only unique index.

Operational boundaries

BoundaryConsequence
TLS is opt-in (--tls)with --tls the transport is encrypted (TLS 1.2); without it, plain TCP (clear text). TLS 1.3 not yet (see Security)
Authentication requiredevery connection must authenticate before data commands; read/readWrite/admin roles gate capabilities
Session tokens are in-memorytokens are lost on server restart; clients re-authenticate (default TTL 1h)
One process per data directoryno cross-process locking; two servers on one dir corrupt it
One writer per collection at a timebulk writes serialize (readers proceed concurrently)
$set-only updatesno field removal, no $inc/$push
No $or index planningtop-level $or always scans
Missing fields ≠ nullmissing matches only $ne; absent from indexes
Deleted space persistsuntil compact, which also rebuilds all indexes
Unclean shutdownindexes rebuild on next open — O(data) startup, zero data loss for acknowledged writes

BisonDB and Prairie are GPLv3 · educational projects.