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.

alt text

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 as Average QPS x Multiplier 2–5 depending on application characteristics.
  • Storage & Bandwidth: Data storage capacity per day/year and necessary network bandwidth.
  • Memory/Cache: RAM capacity needed for Caching to offload the Database.

Architectural Style & Tech Stack Selection

Making Foundational Decisions

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:

Architecture Review & Documentation

Evaluating Trade-offs & Documenting Architecture including:

  • Trade-off Analysis: Evaluate risks, Bottlenecks and Single Points of Failure (SPOF).
  • Documentation: Complete System Architecture Document (SAD) including Architecture 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 adopt Microservices or Kafka too 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!

See more articles here.

Comments

Popular posts from this blog

All Practice Series

Understanding React Server Component

Kubernetes Deployment for Zero Downtime

Sitemap

Deploying a NodeJS Server on Google Kubernetes Engine

React Practice Series

Docker Practice Series

Setting up Kubernetes Dashboard with Kind

Helm for beginer - Deploy nginx to Google Kubernetes Engine

DevOps Practice Series