SHADOW AI

Backup protects recoverable data. Disaster recovery (DR) determines how the platform actually returns to operation after a major failure.
Business continuity (BC) goes one step further:
The organization must continue delivering its most important services even when part of the technology environment is unavailable.
For an AI platform, this includes failures involving:
application servers
databases
object storage
AI providers
model endpoints
queues
caches
networking
DNS
authentication
payment services
third-party APIs
cloud regions
deployment systems
security infrastructure
A mature architecture therefore separates three concepts:
Backup
↓
Recover the data
Disaster Recovery
↓
Recover the technology
Business Continuity
↓
Continue the important business/service
The primary recovery objectives are:
How quickly a service must be restored.
Incident
↓
Detection
↓
Recovery
↓
Service restored
The elapsed time is compared against the target RTO.
How much recent data can potentially be lost.
Last recoverable point
↓
│ data gap
↓
Failure
RPO and RTO should be defined for each critical service rather than applying one number to the entire platform.
Before designing DR, determine what actually matters most.
A business-impact analysis should identify:
critical services
dependent systems
acceptable downtime
acceptable data loss
customer impact
financial impact
security impact
regulatory impact
operational dependencies
Example:
| Service | Criticality | Example RTO | Example RPO |
|---|---|---|---|
| Authentication | Critical | 30 min | 5 min |
| Core database | Critical | 1 hour | 5–15 min |
| File storage | High | 4 hours | 1 hour |
| AI generation | High | 4 hours | 1 hour |
| RAG retrieval | High | 4 hours | 24 hours |
| Analytics | Medium | 24 hours | 24 hours |
| Temporary cache | Low | Rebuild | No recovery required |
These values are examples. Actual objectives should come from business requirements and risk analysis.
AI applications depend on many external systems.
A typical architecture might be:
AI Platform
│
┌────────────────┼────────────────┐
▼ ▼ ▼
Database Storage Identity
│ │ │
└────────────────┼────────────────┘
▼
Application
│
┌─────────────┼─────────────┐
▼ ▼ ▼
Queue Cache AI Provider
│ │
▼ ▼
Workers Model API
DR planning must consider what happens when any dependency fails.
Dependencies can be classified as:
Tier 0 — Platform-critical
Tier 1 — Important
Tier 2 — Degradable
Tier 3 — Optional
For example:
primary authentication
core database
essential storage
security policy engine
AI generation provider
vector retrieval
queue system
analytics
recommendation features
advanced media effects
non-essential dashboards
experimental features
This allows the platform to continue operating in a reduced mode when necessary.
Not every failure should cause a complete outage.
Suppose an external image-generation provider becomes unavailable.
A fragile design:
AI provider unavailable
↓
Entire application unavailable
A resilient design:
Provider unavailable
↓
Fallback provider
↓
If unavailable:
↓
Queue request
↓
Notify user
↓
Core application remains available
This is graceful degradation.
A multi-provider AI architecture can provide resilience.
Conceptually:
User
↓
AI Gateway
↓
Provider Router
├── Provider A
├── Provider B
└── Local Model
The router can determine whether a request should be:
executed immediately
sent to another provider
queued
downgraded to a smaller model
handled locally
rejected safely
Failover should preserve security and tenant isolation.
Automatic provider switching can introduce unexpected behavior.
Different providers may have differences in:
capabilities
safety controls
context limits
output formats
privacy terms
retention behavior
latency
pricing
Therefore failover should not mean:
Provider A → arbitrary Provider B
Instead:
Provider A
↓
Approved equivalent provider
↓
Same security policy
↓
Same tenant restrictions
↓
Compatible task
A database recovery architecture may include:
Primary Database
│
│ replication
▼
Standby Database
If the primary fails:
Failure detected
↓
Validate standby
↓
Promote standby
↓
Update application routing
↓
Run health checks
↓
Resume traffic
Automated failover should include safeguards against split-brain scenarios.
Split brain occurs when two systems incorrectly believe they are the active primary.
Conceptually:
Node A → thinks it is primary
Node B → thinks it is primary
Both may accept writes.
This can produce data divergence.
Recovery systems should therefore use mechanisms appropriate to the database/cluster architecture to ensure that only the intended primary accepts authoritative writes.
Object storage may be replicated or recoverable from a secondary location.
Example:
Primary Storage
│
▼
Replication
│
▼
Secondary Storage
The recovery process must preserve:
object identity
ownership
metadata
access controls
tenant boundaries
integrity information
If an entire region becomes unavailable, traffic may need to move elsewhere.
Conceptually:
Users
↓
Global Traffic Layer
├── Region A
└── Region B
Health checks can determine whether a region is functioning.
However, DNS changes may have caching and propagation effects, so recovery plans should account for realistic traffic behavior.
A higher-resilience architecture may look like:
Global Traffic
│
┌────────┴────────┐
▼ ▼
Region A Region B
Primary Secondary
│ │
┌─────┼─────┐ ┌─────┼─────┐
▼ ▼ ▼ ▼ ▼ ▼
API DB Storage API DB Storage
There are several models.
Region A → active
Region B → standby
Region A → active
Region B → active
Active-active can provide better availability but requires substantially more complexity.
Active-passive architecture is easier to reason about.
Normal:
Region A → traffic
Region B → standby
Failure:
Region A → unavailable
Region B → traffic
Advantages:
simpler
easier operational model
potentially lower cost
Disadvantages:
standby capacity
failover delay
recovery complexity
In active-active architecture:
User traffic
├── Region A
└── Region B
Both regions serve users.
Advantages:
high availability
reduced failover delay
better resource utilization
Challenges:
distributed consistency
duplicate processing
conflict resolution
global state
distributed locking
data replication
It should only be used when its complexity is justified.
Queues are critical for AI generation workloads.
A resilient queue architecture should account for:
message durability
retries
dead-letter queues
duplicate delivery
worker failure
visibility timeouts
ordering requirements
Conceptually:
Request
↓
Durable Queue
↓
Worker
├── Success
├── Retry
└── Dead Letter
Workers should be treated as disposable.
If a worker crashes:
Worker A
↓
crash
↓
Job remains recoverable
↓
Worker B
↓
resume
Job state should therefore live in durable infrastructure rather than only in process memory.
Recovery can create duplicate operations.
Example:
Worker starts generation
↓
provider request sent
↓
worker crashes
↓
job retried
The second worker must determine whether the operation already occurred.
Use:
idempotency keys
durable job states
deterministic identifiers
provider request IDs where supported
Conceptually:
generation_id = G123
should represent one logical generation even if processing is retried.
Authentication is itself a critical dependency.
If the identity system fails:
Database healthy
Storage healthy
AI provider healthy
Authentication unavailable
users may still be unable to access the platform.
Therefore DR planning should include:
identity-provider availability
session behavior
emergency administrative access
credential recovery
MFA recovery
token validation dependencies
Emergency access must remain tightly controlled.
Disaster mode must not become:
normal security disabled
A common dangerous mistake is weakening security because the system is under pressure.
Instead:
Normal security
↓
Emergency security mode
↓
Reduced functionality
+
strong authorization
+
enhanced monitoring
Security controls should be degraded only when explicitly justified and controlled.
Emergency administrators may require temporary access.
A secure emergency process should include:
Incident
↓
Authorize emergency access
↓
Temporary credentials
↓
Perform recovery
↓
Record actions
↓
Revoke access
↓
Review
All emergency actions should remain attributable.
Business continuity also requires communication.
Potential channels:
status page
in-app notification
support channels
internal incident channel
Communication should clearly distinguish:
Service disruption
Security incident
Data-loss event
Maintenance
Partial degradation
Avoid making unsupported claims during an active incident.
A status system can independently communicate availability.
Example:
Platform Status
├── API
├── Authentication
├── AI Generation
├── File Storage
└── RAG
The status infrastructure should have enough independence that it remains available even when the primary application is degraded.
Large incidents benefit from clear responsibility.
Typical roles include:
Incident Commander
Technical Lead
Security Lead
Communications Lead
Operations Lead
One person should not necessarily perform every role during a major incident.
Clear ownership reduces confusion.
A generic recovery runbook:
1. Detect incident
2. Confirm scope
3. Declare incident severity
4. Assign incident commander
5. Protect evidence
6. Stabilize affected systems
7. Determine recovery strategy
8. Select recovery environment
9. Restore critical infrastructure
10. Restore database
11. Restore storage
12. Restore queues
13. Validate authentication
14. Validate tenant isolation
15. Validate security controls
16. Validate AI services
17. Run application health checks
18. Restore user traffic
19. Monitor stability
20. Document recovery
When everything cannot be restored simultaneously, restore in dependency order.
Example:
1. Networking
2. Identity
3. Database
4. Storage
5. Core API
6. Queue
7. Workers
8. AI routing
9. RAG
10. Secondary services
11. Analytics
The exact order depends on architecture.
The general principle is:
Recover foundational dependencies before dependent services.
A DR plan should be tested through multiple methods.
Teams discuss a hypothetical incident.
One recovery component is tested.
A backup is actually restored.
Traffic is moved to another environment.
The organization simulates a major outage.
Testing should gradually increase realism.
A game day is a controlled resilience exercise.
Example:
Scenario:
Primary database becomes unavailable.
The team must determine:
Who responds?
How is the incident detected?
Which database is promoted?
How long does recovery take?
What breaks?
What security controls remain active?
The goal is to discover weaknesses before a real outage.
Chaos engineering intentionally introduces controlled failures to evaluate resilience.
Safe examples include:
stop one non-critical worker
introduce controlled latency
simulate provider timeout
simulate queue delay
disable a test dependency
test database failover
Chaos testing should occur in appropriately controlled environments and should have:
scope limits
monitoring
rollback procedures
authorization
safety boundaries
The purpose is resilience verification, not uncontrolled disruption.
AI platforms have unusual failure modes.
Response:
Provider failure
↓
approved fallback
↓
queue if necessary
Response:
Embedding unavailable
↓
queue ingestion
↓
retry/fallback
Response:
Vector DB unavailable
↓
restore/rebuild
↓
RAG service resumes
Response:
Bad model release
↓
rollback
↓
approved previous model
Response:
load spike
↓
rate limiting
↓
queue
↓
controlled processing
A platform can define degraded modes.
Example:
FULL MODE
↓
All approved AI features
DEGRADED MODE
↓
Core AI features only
EMERGENCY MODE
↓
Read-only + essential operations
RECOVERY MODE
↓
Restricted administrative operations
This allows the platform to remain useful without pretending every feature is available.
When writes are unsafe but reads remain possible:
Users
↓
Read-only application
This can preserve access to:
project information
historical generations
documents
account information
status
while temporarily disabling dangerous mutations.
Read-only mode can be an effective safety mechanism during uncertain incidents.
After recovery, verify:
Database
↕
Storage
↕
Queue
↕
Vector Index
↕
AI Generation Records
A generation record might say:
status = completed
while its output file is missing.
The recovery process should detect such inconsistencies.
After failover, reconciliation processes can identify inconsistent state.
Example:
Generation record exists
↓
Check output object
↓
Exists?
├── Yes → consistent
└── No → reconciliation required
Similar checks can be applied to:
files
database records
vectors
jobs
payments
notifications
Billing should be treated separately from general application recovery.
If a payment provider becomes unavailable:
Payment provider down
↓
Do not assume payment succeeded
↓
Record pending state
↓
Retry/reconcile later
This avoids duplicate charges and incorrect subscription states.
An AI platform may depend on:
Cloud provider
Payment provider
Email provider
SMS provider
AI provider
Identity provider
Analytics provider
CDN
DNS
The business continuity plan should identify:
dependency
impact
fallback
maximum tolerable outage
owner
recovery procedure
Depending entirely on one external provider can create systemic risk.
For critical functions, evaluate:
single provider
↓
single failure domain
Where justified, alternatives may include:
secondary provider
local implementation
manual process
queued processing
degraded mode
Not every dependency needs a replacement. The decision should follow risk analysis.
Disaster recovery must preserve the security principles established in Chapter 74.
During failover:
Tenant A
↓
Region B
↓
Tenant A data only
must remain true.
Never assume that a temporary recovery database or emergency storage environment automatically inherits production authorization controls.
Tenant isolation must be explicitly verified after recovery.
Before reopening the platform:
Network available
Compute healthy
Database healthy
Storage healthy
Authentication working
Authorization working
MFA functioning
Tenant isolation verified
Secrets available securely
Audit logging functioning
Model routing functioning
Approved providers available
Safety policies active
RAG isolation verified
Memory isolation verified
Queue healthy
Workers healthy
Monitoring active
Alerts active
Backups resumed
Core API available
File uploads/downloads working
Generation workflow working
Notifications working
Status communication updated
Recovery should not end when the first successful request arrives.
A proper completion sequence is:
Service restored
↓
Stability monitoring
↓
Data reconciliation
↓
Security verification
↓
Backup verification
↓
Normal operations
↓
Post-incident review
After a major disaster or exercise, document:
what happened
what failed
what worked
recovery duration
data loss
security impact
customer impact
communication effectiveness
unexpected dependencies
failed assumptions
improvements required
The goal is not simply to assign blame.
The goal is to improve system resilience.
Technology recovery alone is insufficient.
Business continuity should also consider:
support operations
customer communication
finance
legal/compliance response
staffing
vendor communication
incident management
executive decision-making
A technically recovered platform can still fail operationally if the organization cannot support customers or make critical decisions.
A mature AI platform can be represented as:
USERS
│
▼
Global Traffic Layer
│
┌────────────┴────────────┐
▼ ▼
Region A Region B
Primary Secondary
│ │
┌──────┼──────┐ ┌──────┼──────┐
▼ ▼ ▼ ▼ ▼ ▼
API DB Storage API DB Storage
│ │ │ │
└──────┬──────┘ └──────┬──────┘
│ │
└──────────┬──────────────┘
▼
Recovery Services
│
┌─────────┼─────────┐
▼ ▼ ▼
Queue AI Router RAG
│
▼
Workers
│
▼
Monitoring / Audit
Every critical path should have a defined failure behavior.
The architecture should follow these principles:
Assume dependencies fail.
Define RTO and RPO explicitly.
Identify critical services.
Separate backup from recovery.
Test restoration regularly.
Prefer graceful degradation over total failure.
Make critical jobs durable.
Make retried operations idempotent.
Protect recovery environments.
Preserve tenant isolation during failover.
Maintain strong security during emergencies.
Monitor recovery operations.
Reconcile inconsistent state after failover.
Maintain independent recovery capabilities where justified.
Continuously improve through exercises.
Disaster recovery is not a document that is written once and forgotten.
It is an engineering capability.
The mature lifecycle is:
Design
↓
Implement
↓
Test
↓
Measure
↓
Improve
↓
Test again
For an AI platform, resilience must cover not only servers and databases but also:
Identity
Data
Storage
Queues
Workers
AI providers
Models
RAG
Memory
Payments
Notifications
Security controls
Tenant isolation
The strongest disaster-recovery architecture is therefore one that can answer five questions clearly:
1. What failed?
2. What must continue?
3. Where do we recover?
4. How do we verify the recovered system?
5. How do we prove that security and data integrity survived?
The ultimate goal is:
A major infrastructure failure should become a controlled recovery event—not an uncontrolled loss of service, security, or customer data.
Comments
Post a Comment