Protocol & Design Interview Questions - Easy

Easy-level protocol and design interview questions covering fundamental concepts.

Q1: What is a network protocol and why is it important?

Answer:

Definition: A set of rules and conventions for communication between network entities.

Why Important:

  • Standardization: Different systems can communicate
  • Interoperability: Works across vendors
  • Reliability: Error handling, retransmission
  • Security: Authentication, encryption

Examples:

  • HTTP: Web communication
  • TCP: Reliable data transfer
  • DNS: Name resolution
  • SMTP: Email delivery

Q2: Explain the OSI model layers.

Answer:

Layer Responsibilities

Mnemonic: "All People Seem To Need Data Processing"


Q3: What's the difference between TCP and UDP?

Answer:

TCP Three-Way Handshake

When to Use Each


Q4: Explain how DNS works.

Answer:

DNS Hierarchy

DNS Record Types:

  • A: IPv4 address
  • AAAA: IPv6 address
  • CNAME: Alias to another name
  • MX: Mail server
  • TXT: Text data

Q5: What is HTTP and how does it work?

Answer:

HTTP Request

HTTP Response

Common Status Codes:

  • 200 OK: Success
  • 201 Created: Resource created
  • 400 Bad Request: Invalid request
  • 401 Unauthorized: Authentication required
  • 404 Not Found: Resource doesn't exist
  • 500 Internal Server Error: Server error

Q6: Explain REST API principles.

Answer:

RESTful URL Design

HTTP Methods

Best Practices:

  • Use nouns, not verbs in URLs
  • Use plural for collections
  • Use HTTP status codes correctly
  • Version your API
  • Use pagination for large collections

Q7: What is WebSocket and when to use it?

Answer:

HTTP vs WebSocket

Use Cases

When NOT to use:

  • Simple request-response
  • Infrequent updates
  • One-way communication (use SSE)

Q8: Explain load balancing basics.

Answer:

Load Balancing Algorithms

Round Robin Example

Benefits:

  • High availability
  • Scalability
  • No single point of failure
  • Better performance

Q9: What is API versioning and why is it important?

Answer:

Versioning Strategies

Version Lifecycle

Best Practices:

  • Version from day one
  • Document breaking changes
  • Give deprecation notice (6-12 months)
  • Support at least 2 versions
  • Use semantic versioning

Q10: Explain basic authentication methods.

Answer:

Basic Authentication

Format: Authorization: Basic base64(username:password)

Pros: Simple Cons: Not secure without HTTPS, credentials in every request

API Key

Pros: Simple, revocable Cons: Long-lived, no user context

JWT (JSON Web Token)

JWT Structure: header.payload.signature

Pros: Stateless, contains claims, secure Cons: Can't revoke easily, size

Comparison


Summary

Key protocol and design concepts:

  • Protocols: Rules for communication
  • OSI Model: 7-layer network model
  • TCP vs UDP: Reliable vs fast
  • DNS: Name to IP resolution
  • HTTP: Web communication protocol
  • REST: Resource-based API design
  • WebSocket: Real-time two-way communication
  • Load Balancing: Distribute traffic
  • API Versioning: Manage changes
  • Authentication: Verify identity

These fundamentals enable building networked systems.

Related Snippets