System Architecture Design
Introduction
The System Architecture Design process is a series of engineering activities aimed at transforming business requirements into a complete, optimized and scalable infrastructure and software model.
The process of system architecture design steps includes:
Requirement Analysis & Scope Definition
This is the time for Technical Requirement Gathering & Analysis to clarify two core groups of requirements with Stakeholders and Product Team:
Functional Requirements (FR): What the system can do (such as ordering, payment, sending notifications, etc.).Non-Functional Requirements (NFR): How the system operates (such as latency < 100ms, target QPS/RPS, 99.99% availability, OWASP/GDPR security standards, Cloud budget).
Capacity Estimation & Resource Planning
Preliminary calculation of operational metrics based on expected active users such as DAU (Daily Active Users) or MAU (Monthly Active Users)
Traffic Estimation: Calculate average and peak request volume (Peak QPS).QPS (Queries Per Second)is the number of requests that the system needs to process in 1 second.Average QPS: Average number of requests per second in a day.Peak QPS: Number of requests at peak times, usually calculated asAverage QPS x Multiplier2–5 depending on application characteristics.
Storage & Bandwidth: Data storage capacity per day/year and necessary network bandwidth.Memory/Cache:RAMcapacity needed forCachingto offload theDatabase.
Architectural Style & Tech Stack Selection
Making Foundational Decisions
- Architectural pattern: Choose Monolith, Microservices, Event-Driven, Serverless or Hybrid.
- Storage technology: Choose Relational DB (PostgreSQL/MySQL), NoSQL (MongoDB, Cassandra), Cache (Redis) or Vector DB.
- Communication: REST API, gRPC, GraphQL or Message Broker (Kafka, RabbitMQ).
High-Level Design (HLD)
Designing the Overall Structure Diagram to build the Big Picture of the system:
- Draw High-Level Architecture Diagram showing Client, Load Balancer, API Gateway, Services, Databases and CDN.
- Define Bounded Contexts between Services and main Data Flow between components.
Low-Level Design (LLD)
Detailed Design of each Component by diving deep into technical details for each Service:
- Design Database schema (Database Schema, Tables, Indexing).
- Define detailed API Contracts (Request/Response schemas).
- Handle advanced problems: Load balancing, Caching strategy, Distributed Lock, Retry/Circuit Breaker pattern.
Architecture Review & Documentation
Evaluating Trade-offs & Documenting Architecture including:
Trade-off Analysis: Evaluate risks, Bottlenecks and Single Points of Failure (SPOF).Documentation: CompleteSystem Architecture Document (SAD)includingArchitecture Decision Records (ADR)to record why technology A was chosen instead of B.
Principles
Core principles to remember when designing:
Keep It Simple (KISS): Start with the simplest architecture possible that can solve the problem. Do not adoptMicroservicesorKafkatoo early if scale does not require it yet.Design for Failure: Any hardware, service or network can go down at any time. Always design self-healing mechanisms, backup and Redundancy.Decoupling: Separate modules and services to reduce dependencies and easily develop, upgrade and scale independently without affecting the entire system.
Happy coding!
Comments
Post a Comment