← All lessons/Operations
42
Operations

Epigenetic Profiles

Switch SapixDB's operational behavior between 5 profiles — no restart required.

Prerequisite: Lesson 2 complete

What you'll learn

  • GET /v1/control/profile — current profile
  • POST /v1/control/profile with {profile: '...'} — instant switch
  • default: balanced reads/writes
  • high_load: larger batches, relaxed fsync, higher throughput
  • compliance: stricter audit logging
  • analytics: optimized for large scans
  • maintenance: reject writes, allow reads
Challenge

Switch to maintenance mode. Try to write — confirm rejected. Switch back to default. Confirm writes work again.

Interactive Walkthrough

What you'll learn

Switch SapixDB's operational behavior between 5 profiles — no restart required.

The five profiles

ProfileWhat it does
defaultBalanced reads/writes, normal fsync
high_loadLarger write batches, relaxed fsync, higher throughput
complianceStricter audit logging, slower but more durable
analyticsOptimized for large scans and aggregates
maintenanceReject writes, allow reads — for backup/migration

Check current profile

curl -s http://localhost:7475/v1/control/profile \
  -H "Authorization: Bearer spx_root_YOUR_ROOT_KEY" \
  | python3 -m json.tool

Switch profile

curl -s -X POST http://localhost:7475/v1/control/profile \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer spx_root_YOUR_ROOT_KEY" \
  -d '{"profile": "high_load"}' \
  | python3 -m json.tool

No restart needed. The change takes effect immediately. All in-flight requests complete under the previous profile.

Switch back

curl -s -X POST http://localhost:7475/v1/control/profile \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer spx_root_YOUR_ROOT_KEY" \
  -d '{"profile": "default"}' \
  | python3 -m json.tool

When to use each profile

  • Pre-migration: switch to maintenance to pause writes while taking a snapshot
  • High write load: switch to high_load during peak ingestion, back to default afterward
  • SOX audit period: switch to compliance for stricter logging
  • Month-end analytics: switch to analytics for heavy reporting queries

Challenge

Switch to maintenance mode. Try to write a record — confirm it is rejected. Switch back to default. Confirm writes work again.

---

← Previous
Lesson 41: Global Broadcast Bus & Publications
Next →
Lesson 43: Snapshots & Backups