System Design Round – Mock Scenarios with Guidance
- Anand Nerurkar
- Apr 15
- 3 min read
✅ System Design 1: Design a Scalable Document Management System (DMS) for a Bank
Use Case:The bank needs a DMS to store, retrieve, and share millions of KYC, loan, and legal documents securely. It must support upload/download, versioning, audit logs, and be compliant with RBI regulations.
Design Goals:
High availability & durability
Role-based access (internal users, customers, auditors)
Metadata-based search
Audit trails & legal hold
Versioning and compliance (data residency, encryption)
What to Cover:
Core Architecture:
Microservices: Upload, Search, Metadata, Compliance
API Gateway for user access
Event-driven (e.g., file uploaded → trigger virus scan)
Storage Layer:
Primary: S3/GCS with versioning and encryption at rest
Metadata DB: PostgreSQL or DocumentDB
Search: Elasticsearch or OpenSearch
Security:
IAM with RBAC
KMS for key management
VPC endpoints and private link access
Compliance:
Audit trail in immutable log (e.g., DynamoDB Streams + Firehose → S3)
Data retention policies
Region-specific storage buckets for data residency
Scalability:
Auto-scaling upload/download services
CDN for static file access (if public download is needed)
Asynchronous processing via queues (e.g., virus scan, OCR)
Bonus: Swagger/OpenAPI docs, Docker-based deployments, container orchestration (EKS/GKE)
✅ System Design 2: Build a Multi-Tenant SaaS Analytics Platform
Use Case:A fintech company wants a cloud-native SaaS analytics product for clients (banks, insurers) to visualize their customer insights. Each tenant needs data isolation and real-time dashboards.
Design Goals:
Multi-tenancy (with data and access isolation)
Real-time + batch analytics
API + Web UI interface
Scale to 50+ tenants and TBs of data
Tenant onboarding and billing
What to Cover:
Tenant Isolation Strategy:
Database-per-tenant (PostgreSQL schema separation) or
Row-level tenant tagging with strict policy enforcement (e.g., Row Level Security in Snowflake)
Data Pipeline:
Kafka for real-time ingestion
ETL with dbt/Spark
Storage in data warehouse (BigQuery, Redshift, Snowflake)
Analytics Engine:
Pre-aggregated dashboards in Superset/Metabase
Custom APIs for client queries
Caching layer (Redis) for hot data
UI Layer:
React-based multi-tenant dashboard
JWT-based SSO integration
Role-based views (admin, user, auditor)
Deployment:
Helm/K8s for isolated services
Istio/Linkerd for service mesh isolation
Use Terraform to provision tenant infra
Bonus:
Usage-based billing model via metering APIs
Monitoring per tenant (e.g., Prometheus labels)
✅ System Design 3: AI-Powered Customer Support Agent with Multi-Channel Integration
Use Case:You need to build an intelligent customer support assistant integrated with WhatsApp, Web, and Mobile App for a loan servicing business. It should use GenAI and retrieve customer-specific information securely.
Design Goals:
Multi-channel integration
GenAI-powered conversational interface
Secure retrieval of customer data
Escalation to human agents when needed
Feedback loop to improve accuracy
What to Cover:
Channel Integration:
Use Twilio/Meta APIs for WhatsApp
Web SDK, mobile SDK integration
API Gateway entrypoint
Conversation Engine:
RAG architecture:
Vector DB (e.g., Pinecone) + embeddings
LangChain/LlamaIndex layer
Fine-tuned LLM (on Azure/OpenAI with prompt engineering)
Context memory for ongoing sessions
Security & Compliance:
Token-based auth
Data minimization: retrieval only of current user's info
Logs stored with redacted PII for audit
Escalation & Handoff:
FSM or workflow engine (e.g., Camunda) to track state
Webhook triggers for live agent routing (via Zendesk, Freshdesk)
Learning Loop:
Feedback rating → model retraining pipeline
Hallucination detection + guardrails
Infra:
Docker containers per agent function
K8s-based orchestration
API-level observability (tracing, alerts)
🔧 Bonus: How to Tackle These in Interviews
Framework to use when answering:
Clarify: Users, constraints, scale, SLAs
Break Down: Key modules or services
Draw: High-level block diagram (if whiteboarded or Miro)
Justify: Tech choices and trade-offs
Plan: Roadmap, phases, and RAID if needed
Comentarios