HyperDrive
HyperDrive sits between the OASIS kernel and the provider layer. It handles replication, failover, health monitoring, and data migration across all registered providers.
How It Works
On every write, HyperDrive:
- Writes to the primary provider.
- Asynchronously replicates to all backup providers in the configured list.
- Tracks success/failure per provider and updates health scores.
On every read, HyperDrive:
- Attempts the primary provider.
- If it fails or is below the health threshold, falls over to the next backup provider.
- Returns the result from whichever provider first responds successfully.
Configuration
{
"OASISDNA": {
"DefaultProviderType": "MongoDBOASIS",
"BackupProviderTypes": [ "SQLiteOASIS", "HoloOASIS" ],
"AutoFailoverEnabled": true,
"AutoReplicationEnabled": true,
"AutoLoadBalanceEnabled": false,
"ProviderHealthCheckInterval": 30, // seconds
"ProviderHealthThreshold": 0.7 // 0–1; below this, provider is bypassed
}
}
Provider Health Scores
HyperDrive maintains a rolling health score (0.0–1.0) for each provider based on recent operation success rates. A provider below ProviderHealthThreshold is automatically bypassed for reads until it recovers.
Query health scores at runtime via the API:
Manual Replication
Trigger a one-off replication from the primary to a specific backup provider:
Body: { "targetProviderType": "HoloOASIS" }
Useful after adding a new provider to backfill its data store from the primary.
Load Balancing
When AutoLoadBalanceEnabled is true, HyperDrive distributes reads across all healthy providers using a weighted round-robin, weighted by health score. Suitable for read-heavy deployments with multiple fast providers.
Async replication means backup providers may be briefly behind the primary after a write. For reads that must see the latest write immediately, either disable async replication (set synchronous mode) or always read from the primary by passing providerType explicitly.