Skip to Content
Professional Website Performance: Optimizing the Front-End and Back-End
book

Professional Website Performance: Optimizing the Front-End and Back-End

by Peter Smith
November 2012
Intermediate to advanced content levelIntermediate to advanced
480 pages
14h 6m
English
Wrox
Content preview from Professional Website Performance: Optimizing the Front-End and Back-End

Appendix A

TCP Performance

A good knowledge of the TCP/IP protocol suite is essential to gain full understanding of network performance. Although a full examination of this suite is a bit outside the scope of this book, this appendix briefly reviews the transmission control protocol (TCP) from the perspective of the three-way handshake, interpreting the output of netstat, and a couple of techniques that you can use to improve TCP performance.

This is not a definitive guide — whole books have been written on the subject — but it should hopefully serve as a starting point for those wanting to learn more.

THE THREE-WAY HANDSHAKE

When reviewing waterfall views of web browsers that are loading sites, you can see how, for many resources, there is a delay during which the client establishes a TCP connection to the web server. (This doesn’t happen for all resource requests because connections that are already open are reused if both sides support KeepAlive.) Figure A-1 shows this region indicated by an arrow on the first request for google.com.

So, what exactly is going on in this time frame? TCP is a reliable, connection-based protocol, and before data can flow, a connection must be established. This is done by means of the three-way handshake.

A lot happens during this handshake — for example, timestamps and sequence numbers are set (so that if packets arrive in the wrong ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Front-end Performance

Front-end Performance

Bruno Skvorc, Craig Buckler, Maria Antonietta Perna, Ivan Curic
Back-end Performance

Back-end Performance

Bruno Skvorc, Christopher Pitt, Tonino Jankov, Reza Lavaryan, Daniel Berman

Publisher Resources

ISBN: 9781118551721Purchase book