BeCuriouzBeCuriouz

Learn something new every day

✍️ Blogs
🏗️

The 3-tier architecture behind almost every web app

💡 Most web apps are three layers — browser, app server, database — each with one job, talking through a request/response cycle.

Almost every web app you use is built on the same three-layer skeleton. Once you can see it, debugging, scaling — and system-design interviews — get dramatically easier, because you can place any problem in one of three boxes.

The browser (the client) renders the interface and sends requests — it holds no data of its own. The app server is where the logic lives: it receives each request, decides what to do, talks to the database, and assembles a response. The database is the system of record — it stores data and returns exactly the rows asked for, nothing more.

Why split it into three? Separation of concerns. Each layer scales, deploys, and fails independently: you can put a CDN in front of the browser tier, run ten copies of the app server behind a load balancer, and keep one source of truth in the database — without any layer knowing how the others are built.

🏗️ The 3-tier architecture behind almost every web app — BeCuriouz