🌐 When You Hit a URL (Full Flow)

 

🔹 1. You Enter URL in Browser

Example: https://example.com

  • Browser parses:
    • Protocol → HTTPS
    • Domain → example.com
  • 🔹 2. DNS Resolution (Domain → IP)

    • Browser checks cache → OS cache → ISP DNS
    • If not found, DNS lookup happens
    • Domain resolves to IP (usually Load Balancer)

    👉 Now browser knows where to send request

🔹 3. TCP Connection (3-Way Handshake)

Browser connects to server IP:

  1. SYN
  2. SYN-ACK
  3. ACK

👉 Connection established


🔹 4. HTTPS / SSL Handshake (Security 🔐)

  • Server sends SSL certificate
  • Browser verifies it
  • Encryption keys are exchanged

👉 Secure connection ready


🔹 5. Request Reaches Load Balancer

  • Domain usually points to LB (public IP)
  • Example tools:
    • NGINX
    • AWS Elastic Load Balancing

👉 LB decides which server should handle request


🔹 5. Request Reaches Load Balancer

  • Domain usually points to LB (public IP)
  • Example tools:
    • NGINX
    • AWS Elastic Load Balancing

👉 LB decides which server should handle request


🔹 7. Application Server Processing

  • Backend server:
    • Authenticates user
    • Runs business logic
    • Calls services

👉 May query database    


🔹 8. Database Query

  • Server fetches data from DB:
    • MySQL (SQL)
    • MongoDB

👉 Data retrieved


🔹 9. Response Travels Back


  • LB forwards response
  • HTTPS encrypts data
  •  10. Browser Renders Page

    • HTML → structure
    • CSS → styling
    • JS → interactivity

    👉 Page visible to user 🎉

  • ⚡ Full Flow (One Line Diagram)

  • User → DNS → Load Balancer → App Server → Database → Response → Browser

  • Comments

    Popular posts from this blog

    Two Sum II - Input Array Is Sorted

    Comparable Vs. Comparator in Java

    Increasing Triplet Subsequence