DevOps · Infrastructure · Case Study

Infrastructure: The Supabase India Block, Yotta Migration, and 29 Services Across 11 Projects

When Supabase got blocked in India, 5 production platforms were affected. The response: evaluate migrating 29 services to Indian sovereign cloud with 63%+ cost reduction. This is how infrastructure decisions work at scale.

29Services to migrate
11Affected projects
63%+Cost reduction
4 vCPUYotta VM spec
16GBRAM

The Supabase India Block

Supabase was blocked in India. The impact was immediate — not a degraded experience, a hard block. Production platforms stopped working for Indian users simultaneously.

🏥

Knight Medicare

CBT therapy platform. Production data layer — auth, session storage, clinical logs. Users in active therapy sessions lost access.

Open Permit

Civic intelligence platform. Core database for permit storage and legal frameworks. The 21-day objection windows don't pause for infrastructure outages.

Adventurers Guild

Already migrated to Neon Postgres before this incident — a decision that proved correct. Zero impact on the Guild.

🤖

AfA Chatbot

RAG vector storage (pgvector) on Supabase. Offline. Research and advocacy work blocked.

The Evaluation: Three Options

Rejected

Option A: Wait It Out

Hope the block reverses. No timeline control — could be days or permanent. Unacceptable for production platforms serving real users. Ruled out immediately.

Selected

Option B: Yotta Self-Hosted

Indian sovereign cloud (Panvel data center). Self-hosted Supabase on 4 vCPU / 16GB KVM VM. 63%+ cost reduction vs. Supabase Cloud. Full data sovereignty and no vendor dependency.

Partial Use

Option C: Alternative BaaS

Firebase lacks Postgres. PlanetScale lacks pgvector. Neon works for new projects but migration complexity is high for existing projects with pgvector. Use for new projects only.

The Migration Plan

Migration Inventory — 29 Services
Migration Inventory
├── Knight Medicare (4 services)
│   ├── Auth (GoTrue)
│   ├── Database (PostgreSQL)
│   ├── Realtime (WebSocket subscriptions)
│   └── Storage (session attachments)
├── Open Permit (3 services)
│   ├── Auth (GoTrue)
│   ├── Database (PostgreSQL + legal frameworks)
│   └── Edge Functions (permit processing)
├── AfA Resource Chatbot (2 services)
│   ├── Database (PostgreSQL)
│   └── pgvector (embeddings store)
└── [7 additional projects] (18 services)
    └── Various auth, database, storage combinations
Total: 27 services across 10 projects

Abstraction Layer Strategy

The critical decision wasn't which provider to migrate to — it was how to migrate without rewriting business logic across 11 projects. The answer: abstract before migrating.

Before: Supabase-Specific
// Before: Supabase-specific everywhere
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(url, key)
const { data } = await supabase.from('sessions').select('*')
After: Provider-Agnostic Interface
// After: abstracted interface
import { getDB } from '@/lib/db'
const db = getDB() // resolves to Supabase or Yotta adapter
const sessions = await db.sessions.findMany()

// Adapter swap = environment variable change
// Business logic = untouched

"Don't just migrate — abstract. The next infrastructure disruption shouldn't require rewriting business logic across 11 projects. Build the abstraction layer once, migrate cleanly, and future provider changes cost hours not weeks."

Yotta Data Center Visit (March 11, 2025)

🔒

Physical Security

Tier III+ facility in Panvel. Biometric access, 24/7 monitoring, redundant power. Adequate for healthcare and civic data compliance requirements.

📶

Network Latency

Single-digit millisecond latency to Mumbai. Reasonable nationwide. Faster than Supabase Cloud for Indian users even before the block.

🖥

VM Provisioning

KVM-based VMs. 4 vCPU / 16GB RAM target configuration. Confirmed self-hosted Supabase stack runs correctly on this spec with headroom.

📞

Support SLAs

4-hour response SLA for critical issues. Direct escalation path. Better than Supabase Cloud support response times for non-enterprise plans.

🤝

Partnership Possibilities

Yotta expressed interest in partnering on the Open Paws India entity for data sovereignty positioning. Potential for preferential rates in exchange for case study.

Cross-Project Decisions

Project Current Target Why
Knight Medicare Supabase Cloud Yotta Self-Hosted Healthcare data sovereignty + compliance requirements
Open Permit Supabase Cloud Yotta Self-Hosted Core platform reliability, civic data shouldn't leave India
Adventurers Guild Neon Postgres Keep Neon Already migrated pre-block, no disruption, serverless scales well
AfA Chatbot Supabase pgvector Yotta Self-Hosted pgvector support on self-hosted, vector search stays local

SMS Provider: MSG91 + Plivo

🇮🇳

MSG91 — India Domestic

Best domestic delivery rates. DLT compliance built-in for transactional SMS. Required for Knight Medicare OTP and Adventurers Guild notifications within India.

🌍

Plivo — International

International coverage for non-India users. Open Permit's 8+ countries require a global SMS provider. Dual routing based on user geography via environment detection.

Claude Code's Role

📋

Service Inventory

Cataloging all 29 services across 11 projects — what each uses, dependencies, migration complexity scores, and priority order. The inventory itself was the foundation for all planning.

🐳

Docker Compose Design

Self-hosted Supabase stack configuration for Yotta: GoTrue, PostgREST, Realtime, Kong API gateway. Health checks, restart policies, volume mounts for persistent storage.

🔄

Migration Scripts

Database dump/restore procedures, pgvector extension setup, GoTrue user data migration, environment variable mapping between Supabase Cloud and self-hosted equivalents.

Key Lessons

Never lock into a single provider. Abstraction layers aren't overengineering — they're insurance against incidents you can't predict. The Supabase India block wasn't a failure of judgment. Not having abstractions in place would have been.

Self-hosting is cheaper at scale. For 11 projects with 29 services, a single Yotta VM saves 63%+ vs. managed services. At early-stage scale, the operational overhead is manageable. The savings fund other infrastructure.

Indian sovereign cloud matters. Latency advantage, regulatory compliance, and data sovereignty for healthcare and civic data. Users notice when their therapy platform is served from a data center in their country.

Infrastructure is product. Reliable infra means therapy sessions don't drop, objection letters generate on time, quest assignments don't fail. Every infrastructure decision has a user-facing consequence somewhere downstream.