Client Socket Interactions During Slow Start
Client Socket Interactions During Slow Start
Client Socket Interactions During Slow Start
This sequence diagram was generated with EventStudio System Designer (http://www.EventHelix.com/EventStudio).
TCP is an end to end protocol which operates over the heterogeneous Internet. TCP has no advance knowledge of the
network characteristics, thus it has to adjust its behavior according to the current state of the network. TCP has built in support
for congestion control. Congestion control ensures that TCP does not pump data at a rate higher than what the network can
handle.
In this sequence diagram we will analyse "Slow start", an important part of the congestion control mechanisms built right into
TCP. As the name suggests, "Slow Start" starts slowly, increasing its window size as it gains confidence about the networks
throughput.
Socket initialization
Server awaits client socket connections.
ACK Client now acknowledges the first segment, thus completing the three
src = Client_Port, way handshake. The receive window is set to 5000. Ack sequence
dst = Server_Port, number is set to 101, this means that the next expected sequence
ack_num = 101, number is 101.
window = 5000
Established At this point, the client assumes that the TCP connection has been
established
A TCP connection starts in the "Slow Start" state. In this state, TCP adjusts its transmission rate based on the rate at which
the acknowledgements are received from the other end.
TCP Slow start is implemented using two variables, viz cwnd (Congestion Window)and ssthresh (Slow Start Threshold).
Client_Socket Interfaces (TCP Slow Start)
Client Node Internet EventStudio System Designer 6
Client Net
Client App Client Socket Network 25-May-13 15:32 (Page 2)
cwnd is a self imposed transmit window restriction at the sender end. cwnd will increase as TCP gains more confidence on
the network's ability to handle traffic. ssthresh is the threshold for determining the point at which TCP exits slow start. If cwnd
increases beyond ssthresh, the TCP session in that direction is considered to be out of slow start phase
ACK Client receives the acknowledgement for the first TCP data segment
ack_num = 513
cwnd = 1024 (2 segments) As the TCP session is in slow start, receipt of an acknowledgement
increments the congestion window by one 1 segment.
TCP Segment
seq_num = 1025,
len = 512
ACK
ack_num = 1537
cwnd = 1536 (3 segments) Receipt for ack again moves the congestion window
TCP Segment
seq_num = 2049,
len = 512
Client_Socket Interfaces (TCP Slow Start)
Client Node Internet EventStudio System Designer 6
Client Net
Client App Client Socket Network 25-May-13 15:32 (Page 3)
TCP Segment
seq_num = 2561,
len = 512
ACK The TCP acknowlegements again increment cwnd. This time two acks
ack_num = 2561 are received, so cwnd will get incremented by 2
ACK
ack_num = 3073
TCP Segment Since cwnd has reached 5 segments, TCP is allowed to send 5
seq_num = 3073, segments without waiting for the ack
len = 512
TCP Segment
seq_num = _4097,
len = 512
TCP Segment
seq_num = _4609,
len = 512
TCP Segment
seq_num = _5121,
len = 512
ACK Three acknowledgements will be received for the 5 TCP segments. Now
ack_num = 4097 the cwnd has almost started increasing geometrically for every round trip
between the client and the server.
cwnd = 3072 (6 segments)
ACK
ack_num = 5121
ACK
ack_num = 5633
TCP Segment
TCP Segment
TCP Segment
TCP Segment
TCP Segment
TCP Segment
ACK Now four acks will be received, thus moving cwnd even more quickly
cwnd = 4608 (9 segments)
ACK
cwnd = 5120 (10 segments)
ACK
cwnd = 5630 (11 segments)
ACK
cwnd = 6144 (12 segments)
Congestion Avoidance Once slow start ends, the session enters congestion avoidance state.
This will be discussed in a subsequent article.
delete
This sequence diagram was generated with EventStudio System Designer (http://www.EventHelix.com/EventStudio).