1. DNS Resolution
Question: What happens when you type a URL into a browser and hit enter?
1. Browser cache check. 2. OS cache check. 3. DNS query to resolver. 4. TCP handshake. 5. HTTP request. 6. Server response. 7. Rendering.
2. TCP vs UDP
Question: What is the difference between TCP and UDP?
TCP: Connection-oriented, reliable, ordered, slower (e.g., HTTP, SSH).
UDP: Connectionless, unreliable, unordered, faster (e.g., DNS, Streaming).
3. HTTP Status Codes
Question: What do the different ranges of HTTP status codes mean?
- 1xx: Informational (e.g., 100 Continue).
- 2xx: Success (e.g., 200 OK, 201 Created).
- 3xx: Redirection (e.g., 301 Moved Permanently, 302 Found).
- 4xx: Client Error (e.g., 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found).
- 5xx: Server Error (e.g., 500 Internal Server Error, 502 Bad Gateway).
4. Load Balancing
Question: What is a Load Balancer and what algorithms does it use?
Concept: A device or software that distributes network traffic across multiple servers to ensure reliability and performance.
Algorithms:
- Round Robin: Sequential distribution.
- Least Connections: Sends traffic to the server with the fewest active connections.
- IP Hash: Uses the client's IP to determine which server receives the request (sticky sessions).
5. SSL/TLS Handshake
Question: Briefly explain the SSL/TLS handshake.
It is the process of establishing a secure connection.
- Client Hello: Client sends supported cipher suites and random number.
- Server Hello: Server selects a cipher suite, sends its certificate and random number.
- Key Exchange: Client verifies certificate and sends a pre-master secret encrypted with the server's public key.
- Session Keys: Both sides generate session keys.
- Secure Connection: Encrypted communication begins.