Multi-Cloud Strategy
The GovTech platform uses the Factory + Interface pattern to enable cloud provider portability. The application code remains unchanged - only the infrastructure provider implementation changes.How Portability Works
To migrate from AWS to OCI: change
CLOUD_PROVIDER=oci in .env and deploy the OCI service implementations. The application code requires zero changes.Service Mapping Across Providers
| Service Interface | AWS | OCI | GCP | Azure |
|---|---|---|---|---|
| StorageService | S3 | Object Storage | Cloud Storage | Blob Storage |
| DatabaseService | RDS PostgreSQL | DB Service | Cloud SQL | Database for PostgreSQL |
| MonitoringService | CloudWatch | Monitoring | Cloud Operations | Azure Monitor |
| AuthService | IAM / Cognito | Identity Cloud | Firebase Auth | Azure AD |
| Container Registry | ECR | OCIR | Artifact Registry | ACR |
| Kubernetes | EKS | OKE | GKE | AKS |
| Load Balancer | ALB | Load Balancer | Cloud Load Balancing | Load Balancer |
| DNS | Route 53 | DNS | Cloud DNS | Azure DNS |
| Secrets | Secrets Manager | Vault Service | Secret Manager | Key Vault |
| CI/CD Auth | OIDC + IAM Role | OIDC + IAM | Workload Identity | Managed Identity |
Architecture Patterns
1. Hybrid Cloud (On-Premise + Cloud)
For organizations with existing data centers that cannot be fully migrated:Use Cases
Use Cases
- Government agencies with mainframe systems that cannot be decommissioned
- Regulatory requirements to keep certain data on-premise
- Gradual migration over multiple years
- Integration with existing Active Directory/LDAP
2. Multi-Cloud Active-Active
For maximum availability with multiple cloud providers:Benefits
- 99.99% availability (52 min downtime/year)
- No single cloud vendor lock-in
- Automatic failover on region failure
- Compliance with multi-provider requirements
Considerations
- 2x infrastructure cost
- Data replication complexity
- Increased operational overhead
- Cross-cloud latency for sync
Service Interface Contracts
Each cloud provider MUST implement these exact method signatures:StorageService Interface
src/services/providers/storage.interface.js
DatabaseService Interface
src/services/providers/database.interface.js
MonitoringService Interface
src/services/providers/monitoring.interface.js
Service Factory Implementation
The factory selects the correct provider based on environment configuration:src/services/factory.js
Environment Variables by Provider
- AWS
- OCI
- GCP
- Azure
Migration Process Between Clouds
Step 1: Infrastructure Preparation
Step 2: Data Migration
Step 3: Service Implementation
Implement the 4 required services for the target provider following the interface contracts.Step 4: Activate Provider
What Changes vs. What Stays
Unchanged
- Application code (Node.js/React)
- Database schema (PostgreSQL)
- Kubernetes manifests
- CI/CD pipelines (change registry only)
- Security policies
- API contracts
Changes Required
- Environment variables (endpoints, regions)
- IAM policies (each cloud has different model)
- Ingress configuration (ALB vs GCP LB)
- Storage classes (gp3 vs pd-ssd)
- Service implementations (4 files per provider)
Real-World Examples
Estonia e-Government
Estonia e-Government
Population: 1.3M citizens
Architecture: AWS + on-premise hybrid
Result: 99% of government services online
Migration Time: Incremental over 10 years (started 2001)
Architecture: AWS + on-premise hybrid
Result: 99% of government services online
Migration Time: Incremental over 10 years (started 2001)
Colombia GOV.CO
Colombia GOV.CO
Population: 50M citizens
Architecture: Multi-cloud (AWS + on-premise)
Migration Time: 3 years (2020-2023) to consolidate 1,000+ services
Challenge: Legacy systems from 50+ government entities
Architecture: Multi-cloud (AWS + on-premise)
Migration Time: 3 years (2020-2023) to consolidate 1,000+ services
Challenge: Legacy systems from 50+ government entities
Singapore SingPass
Singapore SingPass
Population: 5.8M citizens
Architecture: Multi-cloud + hybrid
Availability: 99.99% uptime
Transactions: 500K/day
Security: National Critical Infrastructure Protection
Architecture: Multi-cloud + hybrid
Availability: 99.99% uptime
Transactions: 500K/day
Security: National Critical Infrastructure Protection
The GovTech platform is designed from day one for cloud portability, reducing vendor lock-in risk and enabling governments to switch providers based on cost, compliance, or policy requirements.