Software Architecture > Core Concepts Every Engineer Should Understand

#architecture
single

Software Architecture: Core Concepts Every Engineer Should Understand

Software architecture shapes how systems are built, maintained, and scaled. Yet many engineers find it abstract or intimidating. This guide breaks down the essential concepts you need to know.

What Is Software Architecture?

Software architecture is the high-level structure of a system—the foundational decisions that define how your application works and evolves.

Architecture defines:

  • Major system components (frontend, backend, database, cache, storage)
  • Communication patterns between components
  • Deployment models (cloud, containers, serverless, CDN)
  • Architectural style (monolith, microservices, event-driven)
  • Long-term technical direction

Think of it this way:

Architecture is the blueprint of your system. It focuses on decisions that are expensive—or impossible—to change later.


Architecture Exists at Multiple Levels

Understanding where architecture decisions happen helps you make better choices at each stage.

Level 1: System Architecture (High-Level)

This is your overall system design—the bird's-eye view of how everything fits together.

Key decisions at this level:

  • Monolith vs. Microservices
  • SQL vs. NoSQL databases
  • Cloud-native vs. on-premise infrastructure
  • CDN usage for media delivery
  • Real-time capabilities (WebSockets, Server-Sent Events)

Common considerations:

  • Runtime platform (Node.js, JVM, .NET, Go)
  • Database paradigm (relational, document, graph, time-series)
  • Frontend architecture (SPA, SSR, static site generation)

These decisions directly impact scalability, cost, team structure, and long-term flexibility.


Level 2: Application Architecture (Mid-Level)

Architecture within a single application—how you structure a frontend or backend codebase.

Frontend examples:

  • Feature-based folder structure
  • State management strategy (local, global, server state)
  • Data fetching patterns (REST, GraphQL, tRPC)
  • Separation of UI components and business logic

Backend examples:

  • Layered architecture (presentation, business logic, data access)
  • Clean architecture (dependency inversion, domain-driven design)
  • Service and repository patterns
  • API design (REST, GraphQL, gRPC)

These decisions determine how maintainable, testable, and scalable your application codebase will be.


Level 3: Design Level (Low-Level)

Code-level structure and patterns—the day-to-day decisions developers make.

Examples:

  • Module organization and boundaries
  • Dependency injection strategies
  • Design patterns (Factory, Observer, Strategy, Adapter)
  • Custom hooks and utility functions
  • Error handling approaches

These are easier to refactor than higher-level architectural decisions, giving you more flexibility to evolve as you learn.


Tech Stack vs. Architecture

Important distinction: Your tech stack is the result of architectural decisions, not the starting point.

Example 1: Frontend Requirements

If your architecture requires:

  • Server-side rendering for performance
  • SEO optimization
  • React-based component model
  • API route capabilities

Then you might choose: Next.js

Example 2: Backend Requirements

If your architecture requires:

  • High concurrency handling
  • Non-blocking I/O operations
  • JavaScript for full-stack consistency
  • Fast development iteration

Then you might choose: Node.js with Fastify or Express

Key insight: Architecture defines the direction. Tech stack supports that direction.


Real-World Example: Architectural Decision Record

Let's explore a practical scenario with an Architecture Decision Record (ADR)—a lightweight document that captures important architectural choices.

Business Case: Music Streaming Application

You're building a music streaming platform similar to Spotify.

Requirements:

  • Stream audio to users globally
  • Support millions of concurrent users
  • Provide playlist and library features
  • Deliver personalized recommendations
  • Ensure low-latency, high-quality playback

Major architectural question: How should we deliver audio content to users?


ADR-001: Use CDN-Based Audio Streaming

Status: Accepted
Date: 2026-02-22
Decision Makers: Engineering Team, Infrastructure Lead

Context

The music streaming application must deliver audio with low latency to a global audience while handling high concurrent traffic and maintaining cost efficiency.

Problems with direct backend streaming:

  • High bandwidth costs (every stream hits our servers)
  • Performance bottlenecks (limited server capacity)
  • Poor global latency (users far from data centers suffer)
  • Scaling challenges (linear cost increase with users)

Decision

We will store audio files in object storage (e.g., AWS S3, Google Cloud Storage) and distribute them through a global CDN (e.g., CloudFront, Cloudflare).

How it works:

  1. Audio files are uploaded to object storage
  2. Backend API handles user authentication and authorization
  3. API generates time-limited, signed streaming URLs
  4. Client receives CDN links and streams directly from edge locations
  5. CDN caches content globally for low-latency access

Consequences

✅ Positive:

  • Reduced backend load – Servers handle authentication only, not streaming
  • Global low-latency delivery – Users stream from nearby edge locations
  • Better scalability – CDN handles traffic spikes automatically
  • Lower operational risk – Proven infrastructure with built-in redundancy
  • Cost efficiency at scale – Pay for bandwidth, not compute

⚠️ Negative:

  • Additional CDN costs – Monthly fees based on bandwidth usage
  • Increased complexity – More moving parts to monitor and maintain
  • Third-party dependency – Reliance on external CDN provider
  • Signed URL management – Need secure token generation and expiration logic

Implementation Notes

  • Use HLS or DASH for adaptive bitrate streaming
  • Implement cache-control headers for optimal CDN behavior
  • Monitor CDN costs and set up alerts for anomalies
  • Establish fallback mechanisms if CDN fails

Final Takeaways

Software architecture is about making informed structural decisions that balance trade-offs for your specific context.

Remember the Three Levels

Level 1 – System Architecture
Overall system design, deployment, and infrastructure decisions

Level 2 – Application Architecture
Internal structure of frontend and backend applications

Level 3 – Design & Patterns
Code-level organization, patterns, and practices

Key Principles

Architecture is about trade-offs, not tools
There's no "best" architecture—only appropriate choices for your context

Document important decisions
Use ADRs to capture the reasoning behind major architectural choices

Plan for change
Good architecture makes inevitable changes less painful

Start simple, evolve thoughtfully
Don't over-engineer—add complexity only when justified by real needs


What architectural decisions are you facing in your current project? Understanding these levels can help you choose the right approach and document your reasoning for future team members.

thongvmdev_M9VMOt
WRITTEN BY

thongvmdev

Share and grow together