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:20] – [Layer 4: Transport] 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.
-==== Transport-layer protocols.==== +^ Feature ^ TCP ^ UDP ^ 
- +| Full Name | Transmission Control Protocol | User Datagram Protocol | 
-==== TCP ==== +| Connection Type | Connection-oriented | Connectionless | 
- +| Reliability | Reliable delivery with ACK and retransmission | Best effort, no delivery guarantee | 
-Connection-oriented +| Message Ordering | Preserves packet order | No ordering guarantee | 
-Reliable delivery +| Error Recovery | Automatic retransmission | No retransmission | 
-* Ordered messages +| Flow Control | Yes (sliding window) | No | 
-* Retransmission support +| Congestion Control | Yes | No | 
- +| Overhead | Higher | Lower | 
-Used by: +| Latency | Higher | Lower | 
- +| Speed | Slower due to reliability mechanisms | Faster due to minimal overhead | 
-* HTTP/1.1 +| Header Size | 20–60 bytes | 8 bytes | 
-* HTTP/2 +| Communication Style | Continuous connection between client and server | Independent datagrams | 
-* WebSocket +| Typical Use Cases | Web applications, databases, messaging systems | Real-time communication, gaming, streaming |
-* Redis +
-* RabbitMQ +
-* Kafka +
- +
-==== UDP ==== +
- +
-* Connectionless +
-* Faster +
-* No delivery guarantee+
  
-Used by:+^ Common Protocols and Applications ^ Transport Layer ^ 
 +| HTTP/1.1 | TCP | 
 +| HTTP/2 | TCP | 
 +| WebSocket | TCP | 
 +| Redis (RESP) | TCP | 
 +| RabbitMQ (AMQP) | TCP | 
 +| Apache Kafka Protocol | TCP | 
 +| SMTP | TCP | 
 +| FTP | TCP | 
 +| SSH | TCP | 
 +| DNS | UDP (primarily), TCP (zone transfer and large responses) | 
 +| VoIP | UDP | 
 +| Online Games | UDP | 
 +| WebRTC | UDP | 
 +| QUIC | UDP | 
 +| HTTP/3 | QUIC over UDP |
  
-* 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.1781702434.txt.gz · Last modified: by phong2018