Web Development Simplified

Web development simplified

Client Server Architecture

3-tier architecture

Always a Single Server?

Load balancer

Database Load balancing

Database Sharding

DNS (Domain Name System): The phonebook of Internet

A simple Web request-response flow

  1. ​When we type 'google.com', the browser tries to retrieve the IP address. (first from the browser cache, then from the OS, then from the ISP cache, then asks DNS server)
  2. Browser opens a TCP connection to the server and sends an HTTP Request through that connection
  3. Server process the request (generally using a web application). If needed, fetch data from the Database and prepares a Response
  4. Server returns the Response to the browser
  5. Browser renders the webpage based on the response.

What is HTTP

HTTP (Hypertext Transfer Protocol) is a set of communication rules or Protocol by which Client and Sever talks to each other. 

In the Client-Server model, clients and servers exchange messages in a “request–response” messaging pattern: the client sends a request and the server returns a response.

HTTP Request

HTTP verbs/methods

  1. ​GET
  2. POST
  3. PUT
  4. PATCH
  5. HEAD
  6. DELETE

HTTP Response

Common HTTP Response codes

  1. ​2xx (200, 201, 204 ...): Success
  2. 3xx (301, 302, 303): Redirection
  3. 4xx (400, 401, 403, 404, 422 ...): Client Error
  4. 5xx (500, 502, 503): Server Error

HTTP is Stateless

Cookie, Session

What is HTTPS

  1. ​HTTP + SSL/TLS
  2. Using a SSL certicate the Client-Server creates a secure HTTP connection ('S' in HTTPS stands for 'secure')
  3. HTTPS ensures Privacy, integrity and Identification

How HTTPS works

Want to know more about HTTPS?

https://howhttps.works/
https://tiptopsecurity.com/how-does-https-work-rsa-encryption-explained/

Types of Servers

  1. ​Web Servers
  2. File Servers
  3. Database Servers
  4. Proxy Servers
  5. Mail Servers

Popular web servers

  1. Apache HTTP server
  2. Apache Tomcat
  3. Nginx
  4. Caddy
  5. ​Lighttpd

SMTP (Simple Mail Transfer Protocol)

What is Interent, anyway?

Still not sure?

How to server global users (without CDN)

What is CDN (Content Delivery Network)