Suggest an editImprove this articleRefine the answer for “What is a sliding window?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A sliding window** is a **TCP** mechanism that lets a sender **send several segments in a row without waiting for each one to be acknowledged**, while **not overloading the receiver**. **Key point:** a sliding window is a limit on how much data can be sent "ahead" without waiting for an ACK.Shown above the full answer for quick recall.Answer (EN)Image**A sliding window** is a **TCP** mechanism that lets a sender **send several segments in a row without waiting for each one to be acknowledged**, while **not overloading the receiver**. Simply put: **a sliding window is a limit on how much data can be sent "ahead" without waiting for an ACK**. --- ## Why a sliding window is needed Without a window, TCP would work like this: - send a segment - wait for an acknowledgment - send the next one This would be **very slow**. A sliding window allows: - transferring data as a **stream** - using the network's bandwidth efficiently --- ## How a sliding window works ### 1. **The receiver announces the window size** In every ACK, the receiver reports: - **Window Size** - how many bytes it is ready to accept This protects the receiver from being overloaded. --- ### 2. **The sender can send data within the window** The sender: - can send **several segments** - as long as their total size **does not exceed the window size** Not every segment needs to be acknowledged **immediately**. --- ### 3. **The window "slides"** When the receiver: - acknowledges part of the data the window: - **shifts forward** - freeing up space for new data Hence the name - *sliding window*. --- ## An example to understand it - Window size: **10 bytes** - The sender can send bytes **1-10** - The receiver acknowledges bytes **1-5** - The window shifts forward → now bytes **11-15** can be sent Transmission continues **without stopping**. --- ## What a sliding window actually controls Important. A sliding window in TCP is responsible for: - **flow control** - not for routing - not for correcting errors directly Loss is handled separately, through: - ACKs - timeouts - retransmissions --- ## Relationship to network congestion TCP has **two limits**: 1. **The receiver window** - how much the receiver can accept 2. **The congestion window** - how much the network allows In practice, the sender uses: > **the minimum of these two values** --- ## Why this matters for applications A sliding window: - increases transmission speed - makes TCP scalable - lets it work equally well: - on a local network - and over the InternetFor the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.