42
OperationsEpigenetic 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
| Profile | What it does |
|---|---|
default | Balanced reads/writes, normal fsync |
high_load | Larger write batches, relaxed fsync, higher throughput |
compliance | Stricter audit logging, slower but more durable |
analytics | Optimized for large scans and aggregates |
maintenance | Reject 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.toolSwitch 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.toolNo 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.toolWhen to use each profile
- Pre-migration: switch to
maintenanceto pause writes while taking a snapshot - High write load: switch to
high_loadduring peak ingestion, back todefaultafterward - SOX audit period: switch to
compliancefor stricter logging - Month-end analytics: switch to
analyticsfor 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.
---