Multi-Cloud & Hybrid Cloud — Scenario
- Anand Nerurkar
- 4 days ago
- 12 min read
Multi-Cloud & Hybrid Cloud — Scenario
1) Scenario: “You must design a multi-cloud deployment for the loan origination service so it can survive a complete regional outage in one cloud provider. How do you design it?”
Intent: Test active-active/DR strategy, data replication, DNS, and failover.Think: RTO/RPO, consistency model, cross-cloud networking, transactional state.Step-by-step answer:
Classify SLA: Define RTO/RPO for loan origination (e.g., RTO = 15 min, RPO = 5 min).
Active-Active vs Active-Passive: Choose active-active for front-end stateless APIs; active-passive or warm standby for stateful ledgers.
K8s Multi-Cluster: Deploy identical stateless services to clusters in AKS/EKS/GKE across regions. Use GitOps (ArgoCD) for consistent manifests.
Global Load Balancing: Use global DNS with health checks (Route53/Cloud DNS/Traffic Manager) and weighted failover; session affinity via JWT/cookies if needed.
Data Layer: Use logical replication (CDC) or geo-replication for DBs. For ledger data require synchronous or near-sync replication depending on RPO. If impossible, use write-master in primary and replicate to second with controlled failover.
Event Backbone: Use Kafka MirrorMaker or a managed cross-region replication for topics; ensure consumer groups can resume in secondary cluster.
Stateful Workflow Considerations: Run Temporal workers tied to region of workflow state. If cross-region workflows required, replicate Temporal DB or design workflow handover.
Operational Runbooks & Automation: Automate failover test, include cutover runbooks and health checks.
Test: Regularly DR test and measure RTO/RPO.One-liner to speak: “We run stateless services active-active across clouds with global DNS, replicate events and ledger state via CDC/replication, and automate failover runbooks — balancing consistency and cost per the business RTO/RPO.”
2) Scenario: “A regulator requires that KYC PII must never leave India. The analytics team wants to run ML scoring in GCP US. How do you enable ML without violating residency?”
Intent: Data residency, pseudonymization/tokenization, privacy-preserving ML patterns.Think: Anonymization, edge scoring, model shipping vs data shipping.Step-by-step answer:
Classify data: Tag KYC elements as restricted.
Options: Prefer model shipping (send model to data) over data shipping. That means run ML jobs in-region, or use federated learning/edge inference.
Tokenize/Anonymize: If cross-border processing is unavoidable, pseudonymize or tokenize PII in India and only transfer non-PII features. Keep mapping keys in India.
In-Region Scoring Endpoint: Create scoring endpoints in India that receive anonymized features from GCP or the global system and return scores. Option: run inference container in India using model artifacts exported from GCP.
Contracts & Deletion Policy: Add contractual obligations with cloud vendor for auditability and deletion timelines if temporary processing abroad is allowed.
Audit & Logging: Ensure all transfers and processing are logged for regulator audit.One-liner: “We keep PII in India and either ship models to Indian scoring endpoints or use pseudonymized feature exports; data never leaves cleartext.”
3) Scenario: “Dev teams want to use managed cloud DBs (Aurora / Cloud SQL / Azure DB). CFO warns about vendor lock-in. How do you set policy?”
Intent: Tradeoffs — productivity vs lock-in, abstractions, standards.Think: categorize workloads, cost/benefit, adapter patterns.Step-by-step answer:
Categorize Workloads: Identify which services are OK for managed DBs (analytics, ephemeral services) vs those requiring portability (core ledger).
Define Criteria: Performance, SLAs, compliance, expected scale, and migration cost.
Standardize Patterns: Use provider-agnostic interfaces (e.g., abstract DB access behind repository/adapter). Document allowed managed services with justification.
Proof of Value: For each managed DB use, require a short TCO and migration plan.
IaC & Drift: Keep IaC modules to create equivalent infra in each cloud where possible; use Terraform modules to encapsulate provider differences.
Governance Gate: ARB must approve managed DB decisions; require exit strategy (export, backup, replication).One-liner: “Allow managed DBs for non-regulatory, high-velocity workloads with ARB approval, but require adapter patterns, IaC templates, and a documented exit plan for each use.”
4) Scenario: “You need to guarantee end-to-end encryption and key management across clouds while allowing cross-region read replicas. How do you design KMS?”
Intent: Key management, HSM, cross-region encryption, compliance.Think: HSM/KMS per region, key policies, envelope encryption.Step-by-step answer:
Regional KMS: Provision KMS/HSM in each region where sensitive data resides. Keys for India-resident PII remain in India.
Envelope Encryption: Use application-level envelope encryption — data encrypted with data keys (DEKs), DEKs encrypted with regional KMS CMKs.
Cross-Region Replica Access: For replicas in permitted regions, replicate only ciphertext and ensure DEKs are not exported — or implement key proxy that allows controlled decryption in target under strict policy. Prefer processing-within-region instead.
Key Rotation & Audit: Automate key rotation and audit all KMS operations to central SIEM.
Policy & Access Control: Use IAM + key policies; restrict key usage to necessary roles; use delegation tokens where needed.One-liner: “We use envelope encryption with regionally bound CMKs and strict key policies so PII keys never leave required regions while replicas store ciphertext only.”
5) Scenario: “You must enable low-latency consumer experience for Mumbai users but still keep master data in a Mumbai data center. How do you design?”
Intent: Caching, read replicas, edge strategies.Think: cache consistency, TTLs, staleness tolerance.Step-by-step answer:
Read Replica / Cache: Deploy read replicas or Redis cache in Mumbai cloud region/edge for low-latency reads; master remains in Mumbai DC.
Cache Invalidation: Implement event-driven invalidation (Kafka events) for updates: update master → publish event → cache invalidates or updates.
Eventual Consistency: Define acceptable staleness windows for different APIs; use strong consistency only for critical operations.
API Gateway & Edge: Use edge CDN and regional API gateway to reduce latency for static assets and routing.
Monitoring: Monitor cache hit rate and propagation lag to tune TTLs.One-liner: “We place read replicas & caches close to users and propagate invalidation events from the master to maintain low latency while keeping master data in the Mumbai DC.”
6) Scenario: “A developer team built a cross-cloud feature that silently causes data egress costs to spike. As EA, what controls do you put in place?”
Intent: FinOps, guardrails, cost observability, policy enforcement.Think: tagging, alerts, CI/CD checks, quotas.Step-by-step answer:
Mandatory Resource Tagging: Enforce tags at provisioning (team, project, environment). Block untagged resources.
Egress Budget Alerts: Configure cloud budget alerts with automated throttling or staging rollback for excessive egress.
Policy-as-Code: Use OPA/Gatekeeper to block resources with public egress flows or disallowed cross-region traffic.
Pre-deploy Cost Estimation: Integrate cost estimator in CI to flag potential high-egress patterns.
Network Monitoring: Centralize logs/alerts for unusual network traffic and run anomaly detection.
Chargeback & Accountability: Associate costs to teams and run FinOps reviews monthly.One-liner: “Enforce tagging, policy-as-code, pre-deploy cost checks, and automated budget alerts — so teams are accountable and egress surprises are prevented.”
7) Scenario: “You must migrate the core loan ledger DB to cloud with near-zero downtime. Outline the migration plan.”
Intent: Live migration, expand-contract, data sync, cutover strategies.Think: transactional integrity, dual writes, backfill, cutover.Step-by-step answer:
Assessment: Understand data volume, constraints, read/write patterns.
Target Design: Choose cloud DB (self-managed or managed) with replication & backups.
Expand Phase: Add new schema/tables in cloud; ensure backward compatibility.
Dual Write / CDC: Implement dual writes or use CDC to stream changes from on-prem to cloud; validate with checksum/reconciliation.
Shadow Reads: Route a percentage of read traffic to cloud (canary) to verify behavior.
Switch Writes: After validation, flip writes to cloud in staged fashion (by tenant / shard).
Cutover: Monitor closely, keep rollback plan, and finally decommission old DB once reconciled.One-liner: “We use CDC + dual writes, shadow reads, staged write cutover by shard, and automated reconciliation to achieve near-zero downtime migration.”
8) Scenario: “You discover a zero-day in the K8s control plane across clouds. What’s the emergency EA action plan?”
Intent: Incident response, cross-cloud coordination, patching strategy.Think: containment, mitigation, patching, communication.Step-by-step answer:
Activate Incident Response: Runbook -> Incident Commander, platform & security leads mobilized.
Containment: Isolate management plane network, restrict API access, rotate control plane credentials if compromise suspected.
Mitigation: Apply vendor recommended patches/hotfixes for each managed K8s (EKS/AKS/GKE) and any self-managed clusters. Use rolling upgrades.
Workload Protection: Enforce pod security policies and limit privileges; pause CI/CD deployments until safe.
Forensics & Monitoring: Collect control plane logs, check for suspicious activity; increase telemetry.
Communication: Notify regulators if required, inform stakeholders & impacted teams.
Post-Incident: Root cause, timeline, remediation, patch policy updates, and tabletop exercises.One-liner: “Follow the incident runbook: contain, patch, forensic analysis, communicate, and strengthen patch and hardening processes across clouds.”
9) Scenario: “How do you implement consistent policy enforcement (security/network) across EKS, AKS & GKE?”
Intent: Policy-as-code, multi-cluster management.Think: OPA/Gatekeeper, multi-cluster controllers, centralized policy repo.Step-by-step answer:
Policy Inventory: Define policy catalog (network policies, image signing, resource quotas, secrets access).
Policy-as-Code: Use OPA/Gatekeeper constraints and Rego rules stored in Git.
Multi-Cluster Distribution: Use a controller (ArgoCD, Flux, or a management plane like Anthos/OpenShift) to distribute policies to clusters.
Admission Controls: Enforce at admission time; block non-compliance in CI/CD and cluster admission.
Audit & Reporting: Central dashboard for policy violations; periodic audits and compliance reports for regulators.One-liner: “We codify policies in OPA/Gatekeeper, distribute via GitOps to clusters, enforce at admission & CI gates, and maintain a central audit dashboard.”
10) Scenario: “You must run Temporal workflows that sometimes need to act on data located in different cloud regions. How do you design workflow placement and data access?”
Intent: Workflow locality, latency, consistency, replication.Think: Where workflow state lives, cross-region activity calls, handover.Step-by-step answer:
Workflow Locality: Prefer running Temporal server and its DB in the same region as the primary data for the workflow.
Cross-Region Activities: Make activities idempotent and design them to call remote services via secure APIs. Use async patterns for high latency calls.
Handover Strategy: For long workflows that must operate across regions, model a handover/workflow-chaining approach: workflow A in region A completes and emits an event consumed by workflow B in region B.
State Replication: If strict locality needed, replicate state via DB replication but consider consistency and cost.
Retries & Compensation: Use Temporal’s retry and compensation features to handle transient network issues.One-liner: “Run workflows near the data owner, chain workflows across regions via events for cross-region tasks, and keep activities idempotent with Temporal retries and compensations.”
11) Scenario: “A critical Kafka topic lags behind due to network congestion between clouds. How do you resolve and prevent it?”
Intent: Kafka ops, partitioning, mirroring, network resilience.Think: throttling, mirror, backpressure, retries.Step-by-step answer:
Immediate Mitigation: Increase consumer parallelism and scale consumers; prioritize critical topics.
Backpressure: Temporarily throttle producers to prevent overload.
Network Fix: Work with cloud network team to address congestion; use dedicated links or increase bandwidth if necessary.
Replication Strategy: Use Kafka MirrorMaker2 or Confluent Replicator with resilience patterns; consider tiered topics (hot vs cold).
Partitioning & Retention: Ensure optimal partition counts and retention to avoid backlog.
Monitoring: Set alerts for lag thresholds and implement automated scaling policies.One-liner: “We increase consumer capacity, apply producer throttling, fix network bottlenecks, and rely on robust replication & monitoring to prevent future lag.”
12) Scenario: “You need to onboard a small NBFC to your platform but they demand their data to remain on-prem. How do you enable hybrid connectivity while maintaining a single control plane?”
Intent: Hybrid connectivity, security, single-pane management.Think: VPN/DirectConnect, cluster federation/management plane, data sync patterns.Step-by-step answer:
Connectivity: Establish secure VPN or dedicated DirectConnect/ExpressRoute with IPsec and BGP.
Edge Cluster: Deploy a small on-prem K8s cluster managed via the centralized control plane (Anthos/OpenShift or GitOps agents).
Service Mesh Federation: Use mesh federation to enforce mTLS between on-prem and cloud services.
Data Separation: Keep NBFC data on-prem; expose well-defined APIs for cross-system interactions. Use event bridges for selective replication.
Unified Observability & Policies: Ship sanitized telemetry to central aggregator; enforce policies from central repo but allow local exceptions if regulator requires.
Governance & SLAs: Define onboarding SLA and audit trail for regulators.One-liner: “We use secure dedicated connectivity, an on-prem cluster registered to a centralized management plane, federated service mesh, and strict APIs to enable hybrid integration while preserving on-prem data residency.”
13) Scenario: “How would you perform cost/benefit analysis to decide whether to use Anthos/Anthos-like multi-cloud control plane vs vanilla GitOps + tooling?”
Intent: Platform selection, TCO, operability.Think: CapEx/Opex, vendor lock-in, tooling maturity, team skill.Step-by-step answer:
Requirements: Identify operational requirements: unified policy, multi-cluster lifecycle, security posture, support needs.
Estimate Costs: Compare licensing (Anthos) vs building effort for GitOps + tools (ArgoCD, Crossplane). Include SRE staffing costs.
Time to Value: Evaluate how fast each option delivers features the business needs.
Risk & Lock-in: Assess vendor lock-in, upgrade paths, and support SLAs.
PoC: Run a small PoC to validate operational assumptions.
Decision: Choose commercial managed plane if cost of ops + risk of DIY is higher; otherwise prefer modular GitOps for more control and lower license cost.One-liner: “We weigh TCO, time-to-value, risk and ops maturity — choose managed multi-cloud control plane when it saves operational burden and meets compliance; otherwise GitOps + tooling is preferred.”
14) Scenario: “A compliance audit finds that some backups are stored in a non-approved country. What immediate remediations and policy changes do you implement?”
Intent: Incident remediation, policy enforcement, audit response.Think: Data discovery, access revoke, retention change, policy code.Step-by-step answer:
Containment: Identify offending backups, stop any further replication to non-approved regions, and isolate backups immediately.
Remediation: Copy backups to approved in-region stores and delete non-approved copies per legal counsel.
Root Cause: Find process or IaC change that caused misplacement.
Policy Fix: Enforce storage class and region policy via OPA/Gatekeeper and CI/CD checks to prevent future misconfigurations.
Audit Trail & Communication: Document remediation actions, notify regulator if required, and include findings in the audit response.
Preventive: Add automated detection for cross-region backups and run daily compliance reports.One-liner: “Contain and remediate by moving/deleting non-compliant backups, patch IaC/policy gates, and strengthen automated compliance detection and reporting.”
15) Scenario: “You must demonstrate to the board how hybrid & multi-cloud reduces business risk and what the cost tradeoffs are. What 6-point summary do you present?”
Intent: Executive communication, tradeoff clarity.Think: Business risk mapping, cost vs resilience.Step-by-step answer (six points):
Resilience: Multi-cloud reduces vendor/regional outage risk — measurable improvement in availability (show RTO/RPO delta).
Regulatory Compliance: Hybrid allows locality for regulated data while enabling cloud innovation elsewhere.
Performance: Place workloads close to users for latency gains; hybrid supports proximity.
Cost Tradeoff: Multi-cloud increases complexity & operational cost (SRE overhead, data egress), quantify expected incremental Opex.
Vendor Negotiation: Multi-cloud reduces lock-in and improves negotiation leverage with providers.
Roadmap: Propose phased investment (platform first, then migration) with expected ROI and payback timeline.One-liner: “I’d present resilience, compliance, performance benefits versus the extra platform cost, and show a phased roadmap with ROI and KPIs to manage investment.”
If you want, I can now:
Convert these into 10 mock interview prompts (role-play) with scoring rubrics,
Produce a one-page cheat sheet summarizing the best practices and policy checks, or
Generate detailed runbooks / IaC module layout for one specific scenario (e.g., cross-region DB replication or Temporal workflow handover).
“A regulator requires that KYC PII must never leave India. The analytics team wants to run ML scoring in GCP US. How do you enable ML without violating residency?”
How To Achieve
====
Excellent — let’s go deep step-by-step through this scenario with a realistic banking use case so you can visualize the architecture, data flow, and compliance controls clearly.
🏦 Use Case — KYC & Credit Risk Scoring (Regulatory Data Residency Challenge)
Business Context
You’re a bank operating in India under RBI and SEBI regulations.
KYC data (PII) — e.g., name, Aadhaar, PAN, address, income — must remain within Indian borders.
The Data Science team in GCP US region has built an advanced ML model for credit risk scoring (using historical global data).
The bank wants to use that model to score Indian loan applicants without violating data residency.
⚙️ Step-by-Step Design — How to Achieve This
Step 1: Classify & Segment Data
Data Type | Example | Residency Policy | Handling Strategy |
PII / KYC | Name, Aadhaar, PAN, DOB | Must stay in India | Stored in Azure India or GCP India region |
Non-PII / Derived Features | Credit history length, avg. balance, transaction velocity, derived risk score | Can move cross-border | Allowed for transfer (after anonymization) |
ML Model | Risk scoring model parameters | No residency restriction | Can move freely to India |
➡️ Decision: We keep PII in India, and move the ML model to India for scoring — not the data.
Step 2: Deploy a Local Scoring Service in India
The ML model trained in GCP US is exported as a model artifact (e.g., TensorFlow .pb file or ONNX format).
This artifact is deployed in a secure GCP India region (or Azure India) inference endpoint via:
Vertex AI prediction endpoint (India region)
or containerized inference service (Docker) on GKE/AKS India
📦 Example:
us-ml-project/
└── trained_model/
└── risk_model_v3.onnx
This model is copied to India:
gs://india-model-repo/risk_model_v3.onnx
Then loaded into a local inference API:
Step 3: Pseudonymize and Prepare Input Features
The KYC service in India prepares derived features — e.g.:
{
"customer_id": "cust-8393",
"age": 32,
"credit_history_months": 48,
"avg_balance": 120000,
"monthly_txn_count": 45
}
All PII is stripped off — name, Aadhaar, PAN, etc. never leave India.
These feature vectors are stored or streamed to the local scoring endpoint in India.
Step 4: Model Inference Happens Within India
The local scoring API in India runs the model and produces the result:
{
"customer_id": "cust-8393",
"risk_score": 0.82
}
The risk_score (non-PII) is stored in India DB and also can be sent back to the global analytics team if needed (since it has no PII).
✅ Regulatory Compliance: No personal data crossed the border.
Step 5: Optional Federated Learning / Central Retraining
To improve models over time:
India region logs model performance and local feature distributions.
These are aggregated into anonymized statistics (no individual data).
These statistics are sent to GCP US where global model retraining happens.
Updated model version is re-exported and redeployed to India.
This is Federated Learning / Model Shipping pattern:
📤 “Ship model to data” — not “data to model”.
Step 6: Controls & Auditability
To satisfy RBI/SEBI data governance:
Data Classification Labels — PII, Sensitive, Public.
IAM & DLP Policies — restrict access and enforce DLP on all outbound traffic.
Encryption:
PII in rest: AES-256
In transit: TLS 1.3
Cloud Config Guardrails:
OPA/Gatekeeper or Forseti to block any resource creating storage in non-India regions.
Audit Logging:
Every model request/response logged in India, not exported.
Legal Assurance:
Contracts ensure data residency and audit rights with cloud provider.
🧩 Logical Architecture (Textual Flow)
[Loan Origination App]
|
v
[KYC + Data Preparation Service (India)]
-> generates feature vector (no PII)
|
v
[Local ML Scoring API (India)]
-> loads model artifact from local repo
-> computes risk_score
|
v
[Decision Engine]
-> uses risk_score for approval/rejection
|
v
[Storage & Audit Logs (India only)]
|
v
[Anonymized stats to GCP US for retraining]
✅ Key Design Principles
Principle | Implementation |
Data Residency | PII stays in Indian region DBs and storage |
Model Portability | Export model artifact and deploy locally |
Privacy Preservation | Strip identifiers → use anonymized features |
Separation of Concerns | Analytics in US; scoring/inference in India |
Compliance by Design | DLP, IAM, Audit, and policy-as-code enforced |
Federated Learning | Send model to data for training/inference |
🧠 Summary Talking Points (for interview)
“We never move raw KYC or PII data outside India. Instead, we move the model to the data, deploying an inference service in the Indian region.”
“We enforce pseudonymization and data classification policies so only derived features are processed by ML models.”
“For continuous improvement, we send aggregated, anonymized metrics to GCP US for retraining under federated learning.”
“This approach balances regulatory compliance, AI innovation, and operational efficiency.”
Comments