We won't center our attention on PHP this time !
Nowadays, more and more PHP professional ignore how the network works. But PHP is in the middle of the network !
Abstracted down in the low level of our OS, the network can be responsible of many failures.
This talk will quickly recall how the overall network (Internet) works, with OSI layers ; and will quickly converge on concrete case : TCP/IP
How does TCP/IP works ? How does TCP dynamically measures network congestion and adapts itself to avoid it and share fairly the underlying pipe ? How does that impact your code in userland ?
What is slow-start ? What is Reno ? What are those Linux tcp_*** settings for and those socket() options I can use ? How can I tune them ?
Understanding the network helps a lot in debugging uncommon but especially troublesome scenarios. It also helps in understanding why and how a PHP script could fail due to network problem.
We'll use tcpdump and WireShark GUI to debug network scenarios, and to find a guilty part : network , or app ?