CACS406 Network Administration

Network AdministrationUnit 312 min read

Types of Servers & Their Applications

Unit 3 of Network Administration: Explores the 7 core server types (file, web, database, mail, application, DNS, proxy) with their hardware/software needs, real-world roles, and comparisons, plus how they integrate into enterprise networks like NTC or Ncell.

TAKEAWAYS:

  • A file server stores and shares data (e.g., NTC’s central storage for employee documents).
  • A web server hosts websites (e.g., Daraz’s e-commerce platform relies on Apache/Nginx).
  • Database servers power apps like eSewa’s transaction logs (MySQL vs. Oracle trade-offs).
  • Mail servers enable communication (e.g., Gmail’s SMTP/IMAP infrastructure).
  • Application servers run business logic (e.g., Pathao’s ride-matching backend).
  • DNS servers translate domain names (e.g., www.youtube.com → IP lookup).
  • Proxy servers cache and filter traffic (e.g., Ncell’s ISP proxy for bandwidth savings).

1. Server Fundamentals

A server is a specialized computer that provides centralized services (data, apps, communication) to clients over a network. Unlike workstations, servers prioritize:

  • Reliability (24/7 uptime, RAID storage).
  • Scalability (vertical/horizontal expansion).
  • Security (firewalls, access controls).

Key Metrics:

Metric Server Requirement Example (Ncell)
CPU Multi-core (e.g., Intel Xeon) Handles 10K+ mobile data connections
RAM 16GB–128GB (depends on workload) Database server for call records
Storage SSD/HDD (RAID 10 for redundancy) NTC’s central file storage
Networking Gigabit/Ethernet, redundant links Dual ISP backup for uptime

server hardware rack labeled**server hardware rack labeled (Image: Fleshas, CC BY-SA 4.0, via Wikimedia Commons)

Component Role
Motherboard Connects CPU, RAM, storage
Power Supply UPS backup for crashes
Cooling Liquid cooling for high-density racks

2. Types of Servers & Applications

A. File Server

Definition: Stores and manages shared files (documents, media, backups). How It Works:

  1. Clients request access via SMB (Windows) or NFS (Linux).
  2. Permissions (read/write/execute) enforce security.
  3. Replication ensures data redundancy.

Real-World Example: NTC’s Central Storage

  • Use Case: Stores employee HR records, network configs, and video surveillance feeds.
  • Tech Stack: Windows Server + DFS (Distributed File System) for redundancy.
  • Worked Example:
    • Scenario: A NTC engineer deletes a critical config file. Replication restores it from a secondary server in 2 seconds.

Comparison Table:

Feature Windows File Server Linux (NFS) Server
Protocol SMB (Server Message Block) NFS (Network File System)
OS Windows Server Ubuntu/CentOS
Scalability Limited by Windows licenses Better for large clusters
Use Case Enterprise (NTC) Cloud storage (Google Drive)

B. Web Server

Definition: Hosts websites and delivers web pages via HTTP/HTTPS. Key Components:

graph TD
    A["Client Browser"] -->|"HTTP Request"| B["Web Server"]
    B -->|"Process Request"| C["Application Server"]
    C -->|"Database Query"| D["Database Server"]
    D -->|"Data"| C
    C -->|"HTML/JSON"| B
    B -->|"HTTP Response"| A

Real-World Example: Daraz’s E-Commerce Platform

  • Use Case: Powers product listings, checkout, and order tracking.
  • Tech Stack: Apache/Nginx (web server) + PHP/Python (backend) + MySQL (database).
  • Worked Example:
    • Scenario: A user searches for "laptops" on Daraz.
      1. Browser sends HTTP request to daraz.com.
      2. Nginx routes to PHP script.
      3. Script queries MySQL for laptop inventory → returns HTML.

Packet Format: HTTP Request/Response

GET /products/laptops HTTP/1.1
Host: daraz.com
User-Agent: Mozilla/5.0
HTTP/1.1 200 OK
Content-Type: text/html
<html>...</html>

C. Database Server

Definition: Manages structured data (e.g., user accounts, transactions). Types:

  1. Relational (SQL): Tables with relationships (e.g., MySQL, PostgreSQL).
  2. NoSQL: Flexible schemas (e.g., MongoDB for JSON data).

Real-World Example: eSewa’s Transaction Logs

  • Use Case: Tracks 1M+ daily transactions (wallet balances, payments).
  • Tech Stack: PostgreSQL (relational) for audit trails.
  • Worked Example:
    • Scenario: User A transfers ₹500 to User B.
      BEGIN TRANSACTION;
      UPDATE accounts SET balance = balance - 500 WHERE user_id = 'A';
      UPDATE accounts SET balance = balance + 500 WHERE user_id = 'B';
      COMMIT;
      
      • Why SQL? Ensures ACID compliance (atomicity, consistency).

Comparison Table:

Database Type Pros Cons Example Use Case
SQL Structured, ACID-compliant Less flexible for unstructured data Bank transactions (NMB)
NoSQL Scalable, schema-less No transactions User profiles (Facebook)

D. Mail Server

Definition: Handles email storage, routing, and delivery (SMTP/IMAP). How It Works:

sequenceDiagram
    participant Client
    participant SMTP_Server
    participant IMAP_Server
    participant Database

    Client->>SMTP_Server: SEND (SMTP)
    SMTP_Server->>Database: Store email
    SMTP_Server->>Client: 250 OK
    Client->>IMAP_Server: FETCH (IMAP)
    IMAP_Server->>Database: Retrieve email
    IMAP_Server->>Client: Email data

Real-World Example: Gmail’s Infrastructure

  • Use Case: Processes 1.5B+ emails/day.
  • Tech Stack: Postfix (SMTP) + Dovecot (IMAP) + BigQuery (analytics).
  • Worked Example:
    • Scenario: You send an email to support@daraz.com.
      1. SMTP delivers to Daraz’s mail server.
      2. IMAP stores it in the inbox.
      3. Spam filters (e.g., Google’s TensorFlow models) block phishing.

E. Application Server

Definition: Runs business logic (e.g., authentication, payment processing). Example Architectures:

  1. Monolithic: All layers (web + app + DB) in one server (e.g., early Daraz).
  2. Microservices: Decoupled services (e.g., Pathao’s ride-matching API).

Real-World Example: Pathao’s Ride-Matching

  • Use Case: Connects drivers to riders in real time.
  • Tech Stack: Node.js (backend) + Redis (caching) + Kafka (event streaming).
  • Worked Example:
    • Scenario: Rider requests a Pathao near Kathmandu.
      1. Frontend sends JSON to /api/ride.
      2. Application Server queries Redis for nearby drivers.
      3. Kafka publishes event to driver’s app.

Comparison Table:

Architecture Pros Cons Example
Monolithic Simpler deployment Harder to scale Legacy banking systems
Microservices Independent scaling Complex networking Pathao’s ride-matching API

F. DNS Server

Definition: Translates domain names (e.g., google.com) to IP addresses. How It Works:

sequenceDiagram
    participant Client
    participant Local_DNS
    participant Root_DNS
    participant TLD_DNS
    participant Authoritative_DNS

    Client->>Local_DNS: DNS Query (google.com)
    Local_DNS->>Root_DNS: Query
    Root_DNS->>Local_DNS: "Try .com TLD"
    Local_DNS->>TLD_DNS: Query
    TLD_DNS->>Local_DNS: "Try 8.8.8.8"
    Local_DNS->>Client: 8.8.8.8 (Google’s IP)

Real-World Example: YouTube’s DNS Resolution

  • Use Case: Redirects youtube.com to Google’s CDN.
  • Tech Stack: BIND (DNS server) + Anycast routing.
  • Worked Example:
    • Scenario: You type youtube.com in your browser.
      1. Local DNS (e.g., NTC’s ISP) queries root servers.
      2. Authoritative DNS returns 142.250.190.46.
      3. Browser connects to Google’s CDN for faster loading.

Packet Format: DNS Query/Response

QUESTION SECTION:
    youtube.com.    IN  A
ANSWER SECTION:
    youtube.com.    300    IN  A    142.250.190.46

G. Proxy Server

Definition: Acts as an intermediary between clients and servers (caching, filtering). Types:

  1. Forward Proxy: Clients connect through it (e.g., Ncell’s ISP proxy).
  2. Reverse Proxy: Serves web apps (e.g., Nginx for Daraz).

Real-World Example: Ncell’s Bandwidth Savings

  • Use Case: Caches frequently accessed sites (e.g., facebook.com) to reduce ISP costs.
  • Tech Stack: Squid Proxy + CDN.
  • Worked Example:
    • Scenario: 1000 users visit facebook.com in an hour.
      1. First request hits the proxy → caches the page.
      2. Subsequent requests serve from cache → 90% bandwidth saved.

Comparison Table:

Proxy Type Client-Side Use Case Server-Side Use Case
Forward Bypass geo-restrictions Corporate firewall (NTC)
Reverse Load balancing (Daraz) SSL termination

3. Server Hardware Strategies

Essential Strategies for Servers:

  1. Redundancy:
    • RAID 10 (mirrored + striped) for file servers.
    • UPS (Uninterruptible Power Supply) for Ncell’s call centers.
  2. Scalability:
    • Vertical: Upgrade CPU/RAM (e.g., NMB’s core banking server).
    • Horizontal: Add more nodes (e.g., Daraz’s microservices).
  3. Cooling:
    • Liquid cooling for high-density racks (e.g., Google’s data centers).
  4. Security:
    • Hardware firewalls (e.g., Palo Alto for NTC).
    • BIOS/UEFI passwords to prevent tampering.
Component Role
Cold Aisle Air intake for servers
Hot Aisle Exhaust air vent
CRAC Unit Computer Room Air Conditioning

4. Enterprise Network Integration

Servers integrate into networks via layered models:

graph TD
    subgraph Network Layers
        A["Application Layer"] -->|"HTTP, SMTP"| B["Presentation Layer"]
        B -->|"Encryption"| C["Session Layer"]
        C -->|"TCP/UDP"| D["Transport Layer"]
        D -->|"IP"| E["Network Layer"]
        E -->|"Ethernet"| F["Data Link Layer"]
        F -->|"Physical"| G["Physical Layer"]
    end
    B -->|"Web Server"| H["Server"]
    C -->|"Mail Server"| I["Server"]

Example: NTC’s Network

  • Layer 3 (Network): Routers (Cisco) manage IP traffic.
  • Layer 4 (Transport): TCP ensures reliable file transfers.
  • Layer 7 (Application): DHCP assigns IPs to file servers.

In the Real World

  1. eSewa’s Database Server

    • Idea: Uses PostgreSQL for transactional integrity (ACID compliance).
    • Why? Prevents double-spending in digital wallets.
    • Real Situation: If User X transfers ₹1000 to User Y, the database ensures both accounts update atomically—no partial credits.
  2. Daraz’s Web + Application Servers

    • Idea: Nginx (web server) + Node.js (app server) handle 10K+ concurrent users.
    • Why? Nginx caches static pages (images, CSS), while Node.js processes dynamic checkout flows.
    • Real Situation: During the Dashain sale, Daraz’s servers auto-scale by adding 100+ app server instances to handle traffic spikes.
  3. Ncell’s Proxy Server

    • Idea: Squid Proxy caches facebook.com to reduce ISP bandwidth costs.
    • Why? Nepal’s internet is slow; caching cuts latency by 60%.
    • Real Situation: Without caching, Ncell would spend ₹5M/month on redundant data transfers.

Exam Tip

  • For "Describe five types of servers":

    • Pick file, web, database, mail, and DNS (most exam-friendly).
    • For each:
      1. Define (1 line).
      2. Example (1 real-world app, e.g., NTC for file servers).
      3. Key tech (e.g., "PostgreSQL for eSewa’s transactions").
      4. One advantage (e.g., "DNS reduces IP address memorization").
  • For "Essential hardware strategies":

    • Focus on RAID, UPS, redundancy, and cooling.
    • Use Ncell or NMB as examples (examiners love Nepalese context).
    • Draw a simple RAID 10 diagram in your answer:
      graph TD
          A["Disk 1"] -->|"Mirror"| B["Disk 2"]
          C["Disk 3"] -->|"Stripe"| D["Disk 4"]
  • Bonus Marks:

    • Mention scalability (vertical/horizontal) with a Pathao or Daraz example.
    • Compare SQL vs. NoSQL for database servers (e.g., "eSewa uses SQL for structured transactions").

Based on the TU BCA syllabus for Network Administration (CACS406), unit 3.

Discussion

Loading…