System Design
System Design
Soundar Aswin
1 Contents
2 Algorithms and Coding.................................................................................... 3
2.1 Data structures........................................................................................ 3
2.2 Blind 75.................................................................................................... 3
2.3 Top 150.................................................................................................... 3
3 System Design................................................................................................ 3
3.1 Business Requirements............................................................................ 3
3.2 Functional Requirements..........................................................................3
3.3 Non Functional Requirements..................................................................3
3.4 Technical Solution Design........................................................................3
4 System Design Interview................................................................................ 3
4.1 Concepts.................................................................................................. 3
4.2 Solution Design........................................................................................ 3
4.3 HR............................................................................................................ 3
4.4 Behavioural.............................................................................................. 3
2 Algorithms and Coding
2.1 Data structures
2.2 Blind 75
2.3 Top 150
3 System Design
3.1 Business Requirements
Template
Data Volume & Growth: Can it handle current and future scale?
Performance: Is the workload read-heavy, write-heavy, or mixed?
Concurrency: Expected number of concurrent users and operations.
Consistency Model:
o Strict consistency (ACID)
o Eventual consistency (higher performance, distributed systems)
Scalability:
o Vertical scaling (bigger server)
o Horizontal scaling (distributed nodes)
Security & Compliance: Encryption, IAM, GDPR, PCI DSS.
Integration Needs: Compatibility with your existing systems, APIs, and cloud.
Operational Efficiency: Ease of backup, monitoring, availability, DR.
Cost: Managed service cost, licensing, storage, operational overhead.
Shortlist the databases (SQL, NoSQL, NewSQL, time-series) that meet these NFRs.
4.3 HR
4.3.1Tell me about yourself
Thank you for asking. I work as a Principal Architect at Integrella, with around 15 years of experience in the industry with
around 10 years of being an architect, experience in cloud computing and as an architect. I have worked on multiple domains
like Core Banking, Healthcare, Digital Integration, Shipping, logistics and Retail. I am hands on across AWS and Azure GCP
and on prem platforms. My role is to lead the architecture and design for most of our client projects and also I have to lead
and collaborate with other solutions architect to define best practices, standards, naming common and architecture guidance
across out firm. My role extends to crafting technical proposals, for most of our sales pitches.
4.3.2Key Achievements
Ø Created an low code no code tool named as AIS which minimised development time by 70% across for our
integration projects
Ø Created an automated testing capability named as Comparator which minimised testing time by 50%
Ø Principal Architect for a pro-active monitoring tool which created a revenue of around 1 million to the company
Ø The CTO advisory started a Digital transformation strategy in which I played a key role - where we discussed
architecture styles and open source technology to save 30 to 40% Infrastructure costs for banking clients
4.4 Behavioural
1. How do you Handle Stakeholders?
Create a stakeholder mapping matrix assign role, relationship, power and influence among both internal and
external parties.
Create a communication plan that defines how, when, and through which channels stakeholders will be updated.
The plan should address Meeting schedules and formats, Project Reports, Project backlogs, decision logs, Change
Request and Approvals, Risk and issue log, and Financial reports
Identify all stakeholders, both internal and external, Use stakeholder mapping to assess their influence and role.
High-influence and high-power stakeholders need the most attention.
Seek win-win solutions by understanding each party’s concerns and negotiating common ground.
Involve key stakeholders in critical decisions. This fosters ownership and commitment to the project's success.
Regularly assess the effectiveness of your stakeholder management strategies. Are stakeholders satisfied? Are
their concerns being addressed?
2. Can you describe your career background and how it led you to Solution Architecture?
During this time my mentor was a solution architect, gradually , my interest in system design grew, leading me to
Solution Architecture.
Reasons I'm attracted to it because requires problem-solving skills and being innovative all the time.
My approach is methodical.
3. Can you explain the core principles of system design you follow?
modularity,
scalability,
Secured and
maintainability.
Modularity ensures system flexibility, scalability addresses growth capacity, and maintainability eases future changes.
4. How do you stay updated with emerging technologies and integrate them into your solutions?
[Link] subscription
5. Describe how you would handle a project with frequently changing requirements.
I emphasize design flexibility, using Agile methodologies for iterative development with regular sprint plannning and
shorter sprint of around one to two weeks and
Automating testing and CI/CD pipelines to accommodate frequent changes without compromising quality.
clear communication,
prioritizing tasks,
8. Can you describe your leadership style and its impact on your role as a Solution Architect?
[Link] subscription
5 Projects
5.1 Summary
Revverbank
Business Requirements
The business requirement of the project is to consolidate transaction data obtained from the financial data cloud
platform and Starling Bank, and send it to a third-party reconciliation tool. The bank should be alerted in case of
discrepancies.
The goal is automate the reconciliation process and we need to move from their old monolithic approach to a microservices
approach.
Solution Design
The solution design involves creating REST APIs to automate the reconciliation process. Within Integrella we categories
the API using Mulesoft Model.
We created a bunch of System APIs, Process APIs and Experience APIs. We used Apache came spring boots framework
to develop the [Link] used Kong as the API gateway. Azure AKS as the container orchestration platform and
cosmosDB as the document DB, where transactions were stored as JSON. Gitlab was used as the version control.
ARM templates for IAAS, Azure Container Registry is used for storing container images. D series VMs were hosted in a
muti-availability zone deployment.
Azure monitor and Application inisghts for monitoring,
PatientCarePortal
Business Requirements
The PatientCarePortal is an Integrated care record where we receive the patient details from Multiple trusts at real
time during ED admissions, we will use the information like NHS number, ODS code to pull all the details using the
GP-Connect and Summary Care record APIs.
We use a portal to display the patient care record.
The goal is to help the clinician in ED to view patient historical records, allergies, medical information to make real
time decisions.
Solution Design
The solution design involves creating a portal using Node JS, connectors to receive Hl7/FHIR messages in Intersytems IRIS,
Prometheus and Grafana for monitoring. We used Amazon EKS as the container orchestration platform. Gilab was used as the
version control and we used CI/CD. Terraform was used as the IAAS.
5.2 HSCNI
Business Requirements
To implement a robust Electronic Patient Record (EPR) integration for the HSCNI Encompass programme, ensuring
seamless interoperability between multiple healthcare systems. Achieve Integrated single Care Record among all the six
trusts in Northern Ireland
Functional Requirements
Components
apiVersion: [Link]/v1
kind: Ingress
metadata:
name: epic-api-ingress
spec:
rules:
- host: [Link]
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: epic-api-service
port:
number: 8080
Auto-scaling Configuration:
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: epic-api-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: epic-api
minReplicas: 6
maxReplicas: 12
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
name = "hscni-load-balancer"
location = azurerm_resource_group.[Link]
resource_group_name = azurerm_resource_group.[Link]
sku = "Standard"
}
2.2 Azure API Management (APIM) - Configuration
Components
2.3 Azure Entra ID (Azure AD) Configuration for Role-Based Access Control (RBAC)
Components
"Name": "HSCNI_API_Access",
"Actions": [
"[Link]/service/apis/read",
"[Link]/service/subscriptions/read"
],
"AssignableScopes": [
"/subscriptions/<subscription-id>"
Components
Subnet Categorization:
Components
Components
Azure Traffic Manager: Handles regional failover.
2. Validate auto-failover.
Next Steps:
API Data Flow Diagram for HSCNI EPIC Patient API Solution
Here is the API Data Flow Diagram for the HSCNI EPIC Patient API Solution. This illustrates how data flows between the
NHS Trust System, APIM, AKS, Redis Cache, CosmosDB (FHIR), and Traffic Manager.
Diagram Explanation
1️⃣ NHS Trust System sends a request to Azure API Management (APIM).
2️⃣ APIM forwards the request to Azure Kubernetes Service (AKS).
3️⃣ **APIM authenticates the request via Azure Entra ID (OAuth 2.0).
4️⃣ AKS checks Azure Redis Cache for a cached response to reduce latency.
5️⃣ If no cached response is found, AKS queries Azure Cosmos DB (FHIR) for patient data.
6️⃣ Azure Cosmos DB (FHIR) processes the request and sends the response.
7️⃣ Azure Traffic Manager ensures high availability and directs requests across regions.
8️⃣ In case of a failure, Traffic Manager redirects traffic to a backup region, activating Azure Backup Vault (DR).
Disaster Recovery (DR) Environment for HSCNI EPIC Patient API Solution
The Disaster Recovery (DR) environment ensures high availability, resilience, and minimal downtime for the HSCNI
EPIC Patient API Solution in case of failures. It is designed using multi-region redundancy, automated failover, and
backup restoration.
1️⃣ API requests from NHS Trust Systems reach Azure API Management (APIM) in UK South.
2️⃣ APIM authenticates via Azure Entra ID (OAuth 2.0).
3️⃣ AKS microservices in UK South process API requests.
4️⃣ If data is cached, Azure Redis Cache serves responses.
5️⃣ If not, Azure Cosmos DB (UK South) retrieves and stores patient data.
6️⃣ Azure Traffic Manager directs requests to UK South (Primary Region).
If UK South fails due to network outage, power failure, or service degradation, the DR environment reacts as follows:
If UK South is unresponsive, Traffic Manager updates DNS records to point traffic to UK North.
All API policies (OAuth 2.0, rate limiting, logging) remain intact.
NHS Trust systems continue to interact with FHIR APIs without manual intervention.
Azure Redis Cache in UK North reloads frequently accessed data from Cosmos DB.
If VPN Gateway in UK South fails, NHS Trust traffic is rerouted via the UK North VPN Gateway.
To ensure the DR environment works efficiently, quarterly DR testing drills are conducted.
sh
CopyEdit
Compare patient data responses between UK South backups & UK North active instance.
sh
CopyEdit
Business Requirements
The business requirement of the project is to consolidate transaction data obtained from the financial data cloud
platform and Starling Bank, and send it to a third-party reconciliation tool. The bank should be alerted in case of
discrepancies.
Functional Requirements
Reconciliation Reports: Generate and send daily reconciliation reports (future goal: near real-time).
Discrepancy Alerts: Notify the bank if there are issues in the reconciliation report.
Third-Party Integrations:
Compute Considerations
Database Considerations
Azure Cosmos DB: Used for API-related storage and semi-structured data.
Azure SQL Server: Used for core banking data storage.
Automation
Infrastructure Scripting: Scripts to manage spinning up/down across Dev, Test, and Staging environments.
Development
Apache Camel & Spring Boot: Core development framework for integration and processing.
Integration
Azure Event Grid: Used for loading files from Blob Storage.
Networking
Security
Azure Key Vault: Used for securing secrets and sensitive data.
Monitoring
Virtual Networks (VNets): Segregated VNets per environment (e.g., VNet-Dev, VNet-Test, VNet-Prod).
This High-Level Design (HLD) ensures: ✅ Scalability: AKS-based microservices with auto-scaling. ✅ Security: OAuth 2.0
authentication and RBAC-based access control. ✅ High Availability: Traffic Manager ensures regional failover. ✅
Compliance: Meets FCA, PCI DSS, and GDPR standards.
Next Steps:
11️⃣Validate security policies2️⃣
2with banking regulators. 2 Conduct performance testing3️⃣
3for API performance. 3 Schedule
quarterly disaster recovery drills.
5.4 iSentry
5.1 iSentry AWS Implementation
Business Requirements
The iSentry solution is designed to proactively monitor and alert support engineers on integration performance issues.
The solution must be migrated from GCP to AWS, ensuring:
Functional Requirements
Log Collection: Collect logs from multiple NHS Trusts for monitoring and alerting.
Storage & Analysis: Store logs in Elasticsearch (Amazon OpenSearch Service) for indexing and querying.
Secure Data Transfer: Ensure secure data flow through an AWS Site-to-Site VPN.
User Interface: Provide a dashboard (Amazon QuickSight) for visualizing integration status and alerts.
Components
Amazon Elastic Kubernetes Service (EKS): Manages microservices for log collection and alerting.
Components
Amazon Kinesis Data Streams: Ingests real-time logs from NHS Trusts.
Components
Amazon SNS & EventBridge: Sends alerts to support engineers via email and SMS.
Components
AWS Site-to-Site VPN: Ensures secure data transfer between NHS and AWS.
AWS PrivateLink: Secures communication between microservices.
Components
AWS Config & GuardDuty: Ensures compliance and detects security anomalies.
Components
AWS Backup & Restore: Provides scheduled snapshots and point-in-time recovery.
This AWS-based iSentry HLD ensures: ✅ Scalability: EKS-based architecture with auto-scaling. ✅ Security: Enforced
through AWS Site-to-Site VPN & PrivateLink. ✅ Resilience: Multi-region failover ensures 99.99% uptime. ✅
Compliance: Meets NHS DSPT, GDPR, and security best practices.
Next Steps:
1️⃣Validate AWS security policies with NHS Trusts. 2️⃣Perform performance testing on Kinesis log ingestion. 3️⃣
Schedule quarterly disaster recovery drills.
6 AWS
6.1 Identity and Access
Feature AWS IAM AWS Cognito AWS SSO AWS STS AWS AWS Directory
Organizations Service
Scalability Supports large- Handles millions Scales across Scales with Manages multiple Scales for
scale of users multiple AWS IAM roles AWS accounts corporate
enterprises accounts directory
services
Integratio Works with AWS Integrates with Integrates with Works with Integrates with Works with on-
n services via IAM social identity AWS IAM and all AWS accounts premises Active
roles providers Organizations external Directory
identity
providers
Cost Free with AWS Pay-as-you-go for Included with Free with Free for basic Pay for
usage user AWS AWS usage features, paid for managed
authentication Organizations advanced directory
governance services
6.2 Networking
Feature VPC Peering Transit VPC Private Site-to- Client Direct Network
Gateway Endpoints Link Site VPN VPN Connect Firewall
Explanation Enables direct Centralized Allows Enables Secure Provides Dedicated Stateful,
communicatio hub for private private connection remote private managed
n between two connecting access to connecti between on- users connection firewall
VPCs multiple VPCs AWS vity prem and secure from on- service for
and on- services between AWS via access to prem to controlling
premises without VPCs and IPSec AWS AWS with traffic in/out of
networks traversing AWS tunnels resources low latency VPC
the services via VPN
internet via ENIs
Connectivity One-to-one One-to-many Used for Used for Connects Remote High- Controls and
Scope connection and many-to- AWS third- on-prem to access speed, filters
between two many services party AWS VPCs VPN for dedicated inbound/outbo
VPCs connectivity like S3, SaaS and via VPN clients connection und traffic for
for multiple DynamoDB internal tunnels from on- security
VPCs services prem to
AWS
Security No encryption Provides Uses AWS Uses IAM Encrypted Encrypted More Deep packet
by default, centralized IAM and (IPSec) (TLS) secure inspection,
requires security policies Security than VPN rule-based
additional management Groups (private traffic control
setup link)
Cost Charges for Pay for data Pay per Pay per VPN Pay per Pay per Pay per rule
cross-region transfer and endpoint PrivateLi connection client VPN dedicated and GB
data transfer attachments usage nk charges connectio connection inspected
connecti n
on
Management Simple for Easier Low Low Requires Requires Requires Needs
Complexity small management complexity complexi VPN setup & VPN client provisionin continuous
networks, for multiple ty maintenanc software g and rule tuning
complex as VPCs and e & maintenan
scale hybrid setups managem ce
increases ent
Scalability Limited, Scalable, Scales with Scales Limited by Scales High Highly
manual supports service with VPN tunnels with user scalability scalable
configurations 5,000+ usage service (max 10 per connectio for security layer
needed attachments usage VGW) ns enterprise
needs
6.3 EC2
6.4 EKS
Amazon Elastic Kubernetes Service (Amazon EKS) is a managed Kubernetes service that makes it easy for you to run
Kubernetes on AWS and on-premises. Kubernetes is an open-source system for automating deployment, scaling, and
management of containerized applications. Amazon EKS is certified Kubernetes-conformant, so existing applications that run
on upstream Kubernetes are compatible with Amazon EKS.
Amazon EKS automatically manages the availability and scalability of the Kubernetes control plane nodes responsible for
scheduling containers, managing application availability, storing cluster data, and other key tasks.
Amazon EKS lets you run your Kubernetes applications on both Amazon Elastic Compute Cloud (Amazon EC2) and AWS
Fargate. With Amazon EKS, you can take advantage of all the performance, scale, reliability, and availability of AWS
infrastructure, as well as integrations with AWS networking and security services, such as application load balancers (ALBs)
for load distribution, AWS Identity and Access Management (IAM) integration with role-based access control (RBAC), and AWS
Virtual Private Cloud (VPC) support for pod networking.
6.5 ECS
6.6 AWS Network
6.7 AWS Databases
6.8 Load Balancer
6.9 IAM
7 Azure