User Tools

Site Tools


skills:network

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
skills:network [2026/06/17 13:18] phong2018skills:network [2026/06/17 13:29] (current) phong2018
Line 16: Line 16:
 **Purpose:** Define application rules and message formats. **Purpose:** Define application rules and message formats.
  
-**Examples Protocol: **+**Application-layer protocols** 
 + 
 +These protocols operate at the **Application Layer (Layer 7)** and define how applications exchange data. 
 + 
 +Protocol ^ Full Name ^ Typical Transport Layer ^ Common Use Cases ^ 
 +| HTTP | HyperText Transfer Protocol | TCP | Web pages, REST APIs | 
 +| HTTPS | HTTP over TLS/SSL | TCP | Secure web pages, secure APIs | 
 +| WebSocket | Full-duplex web communication protocol | TCP | Real-time chat, notifications, live updates | 
 +| RESP | Redis Serialization Protocol | TCP | Communication between Redis clients and servers | 
 +| AMQP | Advanced Message Queuing Protocol | TCP | Message brokers such as RabbitMQ | 
 +| Kafka Protocol | Apache Kafka binary protocol | TCP | Event streaming and distributed messaging | 
 +| SMTP | Simple Mail Transfer Protocol | TCP | Sending email | 
 +| FTP | File Transfer Protocol | TCP | File uploads and downloads | 
 +| DNS | Domain Name System | UDP (mostly), TCP (sometimes) | Domain name resolution | 
 +| MQTT | Message Queuing Telemetry Transport | TCP | IoT devices and lightweight messaging | 
 + 
 +===== Notes ===== 
 + 
 +* These are **application-layer protocols**, not transport protocols. 
 +* Most application protocols rely on **TCP** because they require reliable and ordered delivery. 
 +* **DNS** primarily uses **UDP** for low latency, but switches to **TCP** for large responses and zone transfers. 
 +* **HTTPS** is essentially: 
 + 
 +<code> 
 +HTTPS = HTTP + TLS + TCP 
 +</code> 
 + 
 +* **WebSocket** starts with an HTTP handshake, then upgrades to a persistent TCP connection. 
 + 
 +<code> 
 +Client 
 +  ↓ 
 +Application Protocol (HTTP, MQTT, AMQP, RESP) 
 +  ↓ 
 +Transport Protocol (TCP or UDP) 
 +  ↓ 
 +IP 
 +  ↓ 
 +Ethernet / Wi-Fi 
 +</code> 
 + 
 +===== Examples ===== 
 + 
 +<code> 
 +HTTP/1.1 → TCP → IP → Ethernet 
 + 
 +WebSocket → TCP → IP → Ethernet 
 + 
 +DNS → UDP → IP → Ethernet 
 + 
 +MQTT → TCP → IP → Ethernet 
 + 
 +Kafka → TCP → IP → Ethernet 
 + 
 +HTTPS → TLS → TCP → IP → Ethernet </code>
  
-* HTTP / HTTPS 
-* WebSocket 
-* Redis Protocol (RESP) 
-* AMQP (RabbitMQ) 
-* Kafka Protocol 
-* SMTP 
-* FTP 
-* DNS 
-* MQTT 
  
 **Examples of messages:** **Examples of messages:**
Line 76: Line 121:
  
 **Purpose:** Deliver data between processes. **Purpose:** Deliver data between processes.
 +^ Feature ^ TCP ^ UDP ^
 +| Full Name | Transmission Control Protocol | User Datagram Protocol |
 +| Connection Type | Connection-oriented | Connectionless |
 +| Reliability | Reliable delivery with ACK and retransmission | Best effort, no delivery guarantee |
 +| Message Ordering | Preserves packet order | No ordering guarantee |
 +| Error Recovery | Automatic retransmission | No retransmission |
 +| Flow Control | Yes (sliding window) | No |
 +| Congestion Control | Yes | No |
 +| Overhead | Higher | Lower |
 +| Latency | Higher | Lower |
 +| Speed | Slower due to reliability mechanisms | Faster due to minimal overhead |
 +| Header Size | 20–60 bytes | 8 bytes |
 +| Communication Style | Continuous connection between client and server | Independent datagrams |
 +| Typical Use Cases | Web applications, databases, messaging systems | Real-time communication, gaming, streaming |
  
-==== TCP ==== +^ Common Protocols and Applications ^ Transport Layer ^ 
- +HTTP/1.1 | TCP | 
-* Connection-oriented +HTTP/| TCP | 
-* Reliable delivery +WebSocket | TCP | 
-* Ordered messages +Redis (RESP) | TCP | 
-* Retransmission support +RabbitMQ (AMQP) | TCP | 
- +| Apache Kafka Protocol | TCP | 
-Used by: +| SMTP | TCP | 
- +| FTP | TCP | 
-HTTP/1.1 +| SSH | TCP | 
-HTTP/2 +| DNS | UDP (primarily), TCP (zone transfer and large responses) | 
-WebSocket +| VoIP | UDP | 
-Redis +| Online Games | UDP | 
-RabbitMQ +| WebRTC | UDP | 
-Kafka +| QUIC | UDP | 
- +| HTTP/3 | QUIC over UDP |
-==== UDP ==== +
- +
-* Connectionless +
-* Faster +
-* No delivery guarantee +
- +
-Used by:+
  
-* DNS +^ Summary ^ TCP ^ UDP ^ 
-* VoIP +| Main Goal | Reliability and correctness | Speed and low latency | 
-* Online games +| Best For | Data that must not be lost | Data that must arrive quickly | 
-* WebRTC +| Example | File download, API requests, email | Video call, live stream, multiplayer game | 
-* QUIC (HTTP/3)+| Real-world Analogy | Registered mail with delivery confirmation | Radio broadcast |
  
 ===== Layer 3: Network ===== ===== Layer 3: Network =====
skills/network.1781702333.txt.gz · Last modified: by phong2018