Part 3 · System Design10 min read

System Design: The City Plan Behind Every Real App

Client/server, APIs, databases, caches, load balancers, queues, monoliths, microservices, and tradeoffs explained for builders.

Published: June 24, 2026Last updated: June 23, 2026

Writing code and designing a system are related, but they are not the same skill.

Code is like building one room well. System design is planning the city: roads, water, power, traffic, emergency routes, and rules for growth.

You do not need to design Netflix on day one. But you should know the words that describe the city.

Client and server: guest and kitchen

The web begins with a simple picture.

The client is the guest: browser, mobile app, or desktop app.

The server is the kitchen: the place that receives requests, runs private logic, talks to databases, and sends responses.

The API is the menu. It tells the client what it can ask for and what shape the response will have.

The server doesn't only use its own database. It also calls third-party services over their APIs — AI models, payments, email. In that moment your server becomes the guest in someone else's kitchen.

1Client

The browser asks for something.

2API

The request follows an agreed path.

3Server

Private logic runs.

4Cache / DB

Data is found, stored, or reused.

5Response

The result returns to the user.

Browser DNS CDN Server Cache DB AI · external API e.g. OpenAI · Stripe domain → IP static files business logic check first response

Database: the city library

A database is the library where your app stores important records.

There are three broad mental models.

SQL / relational databases are like carefully structured tables. Rows and columns are clear. Relationships matter. They are strong for users, orders, payments, projects, reports, and business data.

NoSQL databases are more flexible document collections. They can fit posts, chat messages, activity feeds, and data whose shape changes often.

Vector databases are the library you search by meaning. They turn text, images, and documents into embeddings — arrays of numbers that capture meaning — and find the most similar items instead of exact keyword matches. That makes them the backbone of AI semantic search, recommendations, and RAG (chatbots grounded in your own documents). Pinecone, Weaviate, and pgvector are common choices.

QuestionSQL / relationalNoSQL / documentVector / embeddings
ShapeTables, rows, columnsDocuments, collectionsEmbeddings (vectors)
StrengthRelationships, joins, consistencyFlexible shape, fast app developmentSimilarity search by meaning
Good forSaaS, finance, reporting, admin toolsChat, feeds, mobile sync, flexible contentAI search, recommendations, RAG
RiskSchema planning requiredQuery/reporting limits laterNot for exact match / aggregation
What matters most? Need relationships & complex queries? Does the schema change often? Need strong consistency? Massive distributed reads/writes? SQL Relational database SQL Payments, orders, finance NoSQL Chat, feeds, content Either Start simple Yes No Yes No Yes No Yes No Yes No

Caching: keep the frequently used book on your desk

Caching means reusing a result instead of recomputing or refetching it.

If a book is used every hour, you do not walk to the library every time. You keep it on your desk.

Caching can make systems much faster. It also creates a question: what happens when the desk copy and the library copy disagree?

That is cache invalidation.

Good cache candidates:

  • Public content that changes rarely.
  • Expensive AI responses that can be reused.
  • Product catalogs.
  • User permissions for a short time.
  • Search results with a short expiration.

Load balancer: checkout line manager

When one server cannot handle all traffic, you add more servers.

A load balancer stands in front and distributes requests.

Like a supermarket employee saying, "This checkout line is open," it keeps one server from receiving all the pressure.

You may not manage load balancers directly on Vercel, Cloudflare, Firebase, Render, or managed cloud platforms. But the concept still matters because many platform features are load balancing hidden behind a button.

Message queue: post office sorting bin

Some work should not happen inside the user’s request.

Sending email, resizing images, generating reports, processing uploads, running long AI jobs, and syncing data can happen later.

A message queue stores tasks until a worker is ready.

This makes the app feel faster and more reliable:

  • The user request finishes quickly.
  • Work can retry if it fails.
  • Workers can scale separately.
  • Long tasks do not time out the web page.

Monolith vs microservices

Monolith

One application contains most of the logic. It is simpler to build, test, deploy, and understand early.

  • Good for small teams.
  • Good for MVPs.
  • Good when the domain is still changing.
Microservices

The system is split into smaller services that can be deployed and scaled independently.

  • Good for larger teams.
  • Good when domains are stable.
  • Expensive in operational complexity.

Most early products should start closer to a monolith. Microservices solve team and scale problems. They also create network, deployment, monitoring, and debugging problems.

Tradeoffs: the real core of system design

System design rarely has one correct answer.

You trade:

  • Speed for cost.
  • Safety for complexity.
  • Flexibility for operational burden.
  • Simplicity for future migration work.
  • Performance for freshness.

Ask AI this

Explain this app's system design as a request flow. Where are the client, server, API, database, cache, queue, and third-party services? What is the simplest architecture that would support the next 1,000 users? What should not be moved to microservices yet?

Frequently asked questions

What is system design?

System design is the practice of choosing how the parts of an application fit together so it can serve real users reliably, scale when needed, and still be changed later.

What is the difference between a client and a server?

The client is what the user interacts with, usually a browser or app. The server is the program that receives requests, processes them, talks to databases or other services, and sends back responses.

When should I use a cache?

Use a cache when reading the same data repeatedly is slow or expensive, and when serving slightly older data for a short time is acceptable.

What is a message queue used for?

A message queue holds work that does not need to finish inside a user request, such as sending email, resizing images, running AI jobs, or syncing data. It lets the app respond quickly and retry failed tasks.

Monolith or microservices: which should I choose first?

Start with a monolith unless you have clear team or scaling pain that requires separate services. Monoliths are simpler to build, test, deploy, and change early.

The takeaway

System design is the skill of seeing the whole city, not just one room.

For early builders, the best architecture is usually the simplest one that can safely serve real users and still be changed later.

About the Author

Jaehee Song

Jaehee Song

Enterprise data platform architect with 20+ years of experience building data systems for Fortune 500 companies. AI development educator who has taught vibe coding and AI development to hundreds of students. Founder of Seattle Partners, helping Korean technology startups navigate the US market.

Author of the AI Development Guide