Mark R Lindsey

Three-Way Handshake — why and when?

In Uncategorized on January 30, 2011 at 4:57 am

I've been pondering why some protocols need a “three-way handshake” when others do not.

For example, TCP requires a three-way handshake. I.e., A to B (syn), then B to A (syn and ack), then A to B again (ack). Then data can flow in both directions.

The SIP INVITE transaction requires this as well. I.e., A to B (INVITE), then B to A (response code like 200), then A to B (ACK).

I did read some Knowledge Theory stuff in my Distribute Algorithms class. It seems like I ought to know this.

It seems like it has something to do with one of these:

(1) The purpose is to BEGIN a flow (and not to do something idempotent).

(2) A is making a request of B, but B must also make a sort of request of A.

Of course, these two options may both, or neither, be involved in the true answer.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: