5. Network Architecture
What is Network Architecture?
Network architecture is the overall design and structure of a computer network. It describes how devices, services, protocols, communication methods, and network resources are organized and how they interact with each other.
In simple words:
Network architecture tells us how a network is designed and how different components communicate.
For example:
Internet │ Router │ Firewall │ Core Switch / \ Server PCs │ Wi-Fi │ Phones/Laptops
This is part of the network's architecture.
Main Types of Network Architecture
The two most important architectures are:
- Peer-to-Peer (P2P) Architecture
- Client-Server Architecture
Network Architecture │ ├── Peer-to-Peer │ └── Client-Server
1. Peer-to-Peer Architecture
In Peer-to-Peer (P2P) architecture, computers can communicate and share resources directly with one another.
There is no requirement for one dedicated central server to control everything.
PC1 / \ / \ PC2 ─── PC3 \ / \ / PC4
Each computer can potentially act as both:
- Client
- Server
depending on the service being used.
Example
Suppose PC1 has a file and shares it with PC2.
PC1 ───── File ─────> PC2
PC1 is acting as a provider of the resource, while PC2 is requesting it.
Characteristics of P2P
- No mandatory dedicated central server
- Devices can share resources directly
- Each peer can provide and consume resources
- Simple for small networks
- Decentralized
Advantages
1. Easy to set up
Small networks can be created without deploying a dedicated server.
2. Low cost
Less specialized server infrastructure is required.
3. Direct sharing
Devices can share files/resources directly.
Disadvantages
1. Difficult to manage at large scale
Managing many independent computers becomes complicated.
2. Security
Security policies can be harder to enforce consistently.
3. Backup
There may not be one central location for backups.
4. Scalability
It becomes less practical as the number of devices grows.
2. Client-Server Architecture
In Client-Server architecture, clients request services from dedicated servers.
Server / | \ / | \ Client Client Client
Example
When you open a website:
Browser (Client) │ │ Request ↓ Web Server │ │ Response ↓ Browser
The browser is the client, and the web server provides the requested service.
How Client-Server Works
Suppose you want to access a website.
Step 1 — Client sends request
Client ───── Request ─────> Server
Step 2 — Server processes request
Server Processing
Step 3 — Server sends response
Client <──── Response ───── Server
For example:
Browser │ │ GET /index.html ↓ Web Server │ │ HTML Response ↓ Browser
Components of Client-Server Architecture
Client
A client is a device or application that requests a service.
Examples:
- Web browser
- Mobile app
- Email client
- Desktop application
- SSH client
Server
A server provides a service to clients.
Examples:
- Web server
- Database server
- DNS server
- File server
- Mail server
- Application server
Example: Web Architecture
Internet │ │ Router │ Firewall │ Load Balancer / \ Web Server 1 Web Server 2 │ │ └──────┬───────┘ │ Application Server │ Database
A large website can have many different server roles.
3-Tier Architecture
A common application architecture is 3-tier architecture.
It separates an application into three logical layers:
Presentation ↓ Application ↓ Data
Tier 1 — Presentation Layer
This is the user interface.
Examples:
- Website
- Mobile application
- Desktop application
User ↓ Browser
Tier 2 — Application Layer
This contains the application logic.
For example:
Browser ↓ Web/Application Server ↓ Business Logic
It processes requests and decides what should happen.
Tier 3 — Data Layer
This handles data storage.
Examples:
- MySQL
- PostgreSQL
- MongoDB
- SQL Server
Application Server ↓ Database
Complete example
User │ ↓ Web Browser │ ↓ Web/App Server │ ↓ Database
4. Two-Tier Architecture
In two-tier architecture, the client communicates more directly with the server/database.
Client │ ↓ Server / Database
For example:
Desktop Application │ ↓ Database Server
It is simpler than a three-tier architecture but may become difficult to scale or secure for large systems.
5. Multi-Tier Architecture
Large applications can use more than three layers.
For example:
User │ ↓ Frontend │ ↓ API Gateway │ ↓ Application Server │ ↓ Database │ ↓ Storage
This allows different components to specialize in different tasks.
Centralized vs Distributed Architecture
Another important way to understand network architecture is by asking:
Where are resources and control located?
Centralized Architecture
Important services are concentrated in a central system.
Central Server / | \ PC1 PC2 PC3
Advantages
- Easier centralized management
- Easier centralized backup
- Consistent policies
- Centralized authentication
Disadvantages
- Central server can become a bottleneck
- Failure can affect many clients
- Requires reliable infrastructure
Distributed Architecture
Services and resources are distributed across multiple systems.
Server 1 / \ / \ Server 2 ─── Server 3 \ / \ / Clients
Different systems can perform different parts of the work.
Advantages
- Better scalability
- Better fault tolerance when properly designed
- Workload can be distributed
- Can improve availability
Disadvantages
- More complex
- Harder to manage
- Synchronization can be challenging
- Security becomes more complicated
Decentralized Architecture
In a decentralized system, control is distributed rather than concentrated in one central authority.
PC1 ─── PC2 │ \ / │ │ \ / │ PC3 ─── PC4
P2P systems are a common example of decentralized architecture.
Network Architecture vs Network Topology
These two terms are often confused.
Topology
Topology describes how devices are connected.
Example:
PC │ PC ── Switch ── PC │ PC
This is a star topology.
Architecture
Architecture describes how the network and its services are organized and how components interact.
Example:
Clients ↓ Web Server ↓ Application Server ↓ Database
This describes an architectural design.
Simple difference
Topology = How devices are connected.
Architecture = How the network operates and how its components are organized.
Network Architecture Layers
Network architecture can also be understood through different functional layers.
A simplified view:
Applications ↓ Transport ↓ Network ↓ Data Link ↓ Physical
These concepts lead directly into the OSI model and TCP/IP model, which you'll study later.
Example: College Network Architecture
Imagine a college with multiple labs.
Internet │ Router │ Firewall │ Core Switch / | \ / | \ CSE LAN Admin LAN Server LAN │ │ │ Switch Switch Servers / | \ │ PC PC PC Database │ Wi-Fi │ ┌─────┼─────┐ Phone Laptop Tablet
This architecture contains:
- Router → connects networks
- Firewall → security
- Switches → LAN connectivity
- Servers → provide services
- Database → stores data
- Access points → wireless access
- Clients → consume services
Client-Server vs Peer-to-Peer
| Feature | Peer-to-Peer | Client-Server |
|---|---|---|
| Central server | Not required | Usually present |
| Management | Distributed | Centralized |
| Cost | Lower for small networks | Higher |
| Security management | More difficult | Easier centrally |
| Scalability | Limited | Better |
| Backup | Distributed | Can be centralized |
| Best suited for | Small/simple networks | Organizations/web services |
Centralized vs Distributed
| Feature | Centralized | Distributed |
|---|---|---|
| Control | Central | Distributed |
| Management | Easier | More complex |
| Scalability | Can be limited | Usually better |
| Failure impact | Central failure can be serious | Can tolerate failures better |
| Complexity | Lower | Higher |
Important Real-World Example: Online Banking
When you use a banking application:
Your Phone │ ↓ Internet │ ↓ Load Balancer │ ↓ Application Servers │ ↓ Database Servers │ ↓ Banking Data
Your phone is the client.
The bank's infrastructure contains multiple services and servers.
The architecture is designed to provide:
- Security
- Availability
- Scalability
- Authentication
- Data processing
- Database access
Important Architecture Concepts
Scalability
The ability of a network/system to handle increasing numbers of users or workloads.
100 users → 1,000 users → 100,000 users
A scalable architecture can grow without requiring a complete redesign.
Availability
How consistently a service remains accessible.
For example:
Server 1 ──┐ ├── Service Server 2 ──┘
If Server 1 fails, Server 2 may continue serving users.
Reliability
The ability of a system to perform correctly and consistently.
Fault Tolerance
The ability to continue operating despite certain failures.
Example:
Internet │ ┌─┴─────────┐ Router 1 Router 2 └────┬──────┘ │ Network
If one path fails, another may remain available.
Redundancy
Having additional components or paths that can take over when something fails.
Primary Server │ ↓ Backup Server
Security in Network Architecture
A good architecture should include security from the beginning.
A simplified secure architecture might be:
Internet │ ↓ Firewall │ ┌──────┴──────┐ │ │ Web Server VPN Gateway │ ↓ Application Server │ ↓ Database
The database should not necessarily be directly exposed to the public Internet.
This is an example of network segmentation and layered security.
Key Points to Remember
Network architecture
Overall design and organization of a network and its services.
Main architectures
Peer-to-Peer ↓ Direct peer communication Client-Server ↓ Clients request services from servers
Other important architectural concepts
Centralized Distributed Decentralized Two-Tier Three-Tier Multi-Tier
Don't confuse:
Topology ↓ How devices are connected Architecture ↓ How the network/services are organized and operate
Next topic: clientserver — there we can go much deeper into clients, servers, requests, responses, server types, ports, protocols, authentication, and real-world client-server communication.