SlideShare a Scribd company logo
1 of 17
June 2016
NETWORK
COMMUNICATION
NETWORK COMMUNICATION
TCP/IP
SOCKETS
CLIENTS AND SERVERS
WAIT STATES
MULTIPLEXING
SERVER LOAD AND THROUGHPUT
TCP/IP
TCP/IP comprises multiple protocols
Link Layer
IP – Internet Protocol
UDP – User Datagram Protocol
TCP – Transmission Control Protocol
Transport Layer TCP and UDP
UDP – Connectionless Datagram Protocol
(used for DNS, BOOTP and others)
TCP – Connection Oriented Protocol
(HTTP, HTTPS, MySQL, etc)
TCP Connections
Connection Establishment
Client SYN ; Sever SYN + ACK ; Client ACK
ISNs – packet sequencing
Inbuilt checksums
Connection Termination
FIN ; FIN + ACK
Sockets
Sockets are how processes communicate over
TCP
Similar to Files: read(), write()
Sockets can be passed like file descriptors
Socket creation handled by kernel
Simple TCP Client
Create Socket
Connect
Read / Write
Close
Simple TCP Server
Create Socket
Bind
Listen
Accept
Read / Write
Close
TCP Server Models
Listen, Accept, Read and Write are all Blocking
Handling Multiple Blocking I/O Calls:
Fork
Prefork
Threads with Select
Process Models
Apache httpd and MySQL with Prefork
Process Models
Nginx with threads, php-fpm
I/O and Wait States
Shh! Don't wake them!
CPUs are faster than I/O
I/O Multiplexing
On a process scale: 1 process, many sockets
On a server scale: 1 server, many sockets
Kernel: Distribute active connections to
processes
Processes: Handle requests, make calculations,
return responses, close sockets
I/O Multiplexing
There must be enough processes to handle the
I/O
There must be enough CPU to handle the
processes
Server Load
CPU Load
=
Number of processes running
+
Number of processes waiting for CPU
Throughput
Number of requests handled per minute
=
Function of
server load,
processing efficiency,
related I/O,
connection overhead
Bibliography
TCP/IP Illustrated
(2 volumes)
Unix Network Programming
(2 volumes)
W. Richard Stevens

More Related Content

What's hot

NFS(Network File System)
NFS(Network File System)NFS(Network File System)
NFS(Network File System)udamale
 
Network file system (nfs)
Network file system (nfs)Network file system (nfs)
Network file system (nfs)Raghu nath
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network ProposalChris Riccio
 
Nfs version 4 protocol presentation
Nfs version 4 protocol presentationNfs version 4 protocol presentation
Nfs version 4 protocol presentationAbu Osama
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file systemSyaiful Ahdan
 
Nfs protocol sequence_diagram
Nfs protocol sequence_diagramNfs protocol sequence_diagram
Nfs protocol sequence_diagramRoberto Castro
 
Network File System in Distributed Computing
Network File System in Distributed ComputingNetwork File System in Distributed Computing
Network File System in Distributed ComputingChandan Padalkar
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefsbergwolf
 
The NFS Version 4 Protocol
The NFS Version 4 ProtocolThe NFS Version 4 Protocol
The NFS Version 4 ProtocolKelum Senanayake
 
Python session.11 By Shanmugam
Python session.11 By ShanmugamPython session.11 By Shanmugam
Python session.11 By ShanmugamNavaneethan Naveen
 
File transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationFile transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationRochakSrivastava3
 

What's hot (20)

NFS(Network File System)
NFS(Network File System)NFS(Network File System)
NFS(Network File System)
 
Network file system (nfs)
Network file system (nfs)Network file system (nfs)
Network file system (nfs)
 
Linux06 nfs
Linux06 nfsLinux06 nfs
Linux06 nfs
 
Postfix
PostfixPostfix
Postfix
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network Proposal
 
Ftp
FtpFtp
Ftp
 
TFTP
TFTPTFTP
TFTP
 
Nfs version 4 protocol presentation
Nfs version 4 protocol presentationNfs version 4 protocol presentation
Nfs version 4 protocol presentation
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file system
 
File Sever
File SeverFile Sever
File Sever
 
Nfs protocol sequence_diagram
Nfs protocol sequence_diagramNfs protocol sequence_diagram
Nfs protocol sequence_diagram
 
Meeting 9 samba
Meeting 9   sambaMeeting 9   samba
Meeting 9 samba
 
Network File System in Distributed Computing
Network File System in Distributed ComputingNetwork File System in Distributed Computing
Network File System in Distributed Computing
 
Nfs
NfsNfs
Nfs
 
network filesystem briefs
network filesystem briefsnetwork filesystem briefs
network filesystem briefs
 
The NFS Version 4 Protocol
The NFS Version 4 ProtocolThe NFS Version 4 Protocol
The NFS Version 4 Protocol
 
Tcpdump
TcpdumpTcpdump
Tcpdump
 
Python session.11 By Shanmugam
Python session.11 By ShanmugamPython session.11 By Shanmugam
Python session.11 By Shanmugam
 
Linux10 sendmail
Linux10 sendmailLinux10 sendmail
Linux10 sendmail
 
File transfer protocol (ftp) in application
File transfer protocol (ftp) in applicationFile transfer protocol (ftp) in application
File transfer protocol (ftp) in application
 

Similar to Network communication

Get To Know Your Protocols
Get To Know Your ProtocolsGet To Know Your Protocols
Get To Know Your ProtocolsU of A
 
10. tcp ip and do d model
10. tcp ip and do d model10. tcp ip and do d model
10. tcp ip and do d modelSwarndeep Singh
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptxazmerawAnna1
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptxkebeAman
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programmingelliando dias
 
file transfer and access utilities
file transfer and access utilitiesfile transfer and access utilities
file transfer and access utilitiestumetr1
 
บทที่ 2 โพรโตคอล (protocol)
บทที่  2 โพรโตคอล (protocol)บทที่  2 โพรโตคอล (protocol)
บทที่ 2 โพรโตคอล (protocol)chrisman77
 
Networking:) Based on Ethical Hacking And Cyber Security
Networking:) Based on Ethical Hacking And Cyber SecurityNetworking:) Based on Ethical Hacking And Cyber Security
Networking:) Based on Ethical Hacking And Cyber SecurityManishKumarH
 
Chapter11 -- networking with tcpip and the internet
Chapter11  -- networking with tcpip and the internetChapter11  -- networking with tcpip and the internet
Chapter11 -- networking with tcpip and the internetRaja Waseem Akhtar
 
Networking Fundamentals
Networking Fundamentals Networking Fundamentals
Networking Fundamentals Vikas Gupta
 
FILE TRANSFER PROTOCOL BY LAXMI $ Group
FILE TRANSFER PROTOCOL BY LAXMI $ GroupFILE TRANSFER PROTOCOL BY LAXMI $ Group
FILE TRANSFER PROTOCOL BY LAXMI $ Grouprajeev bhatt
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocolAmandeep Kaur
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 
Osi model slides
Osi model slidesOsi model slides
Osi model slidesSaba Aslam
 
Linux Servers.pptx
Linux Servers.pptxLinux Servers.pptx
Linux Servers.pptxChSheraz3
 
Socket programming with php
Socket programming with phpSocket programming with php
Socket programming with phpElizabeth Smith
 

Similar to Network communication (20)

Get To Know Your Protocols
Get To Know Your ProtocolsGet To Know Your Protocols
Get To Know Your Protocols
 
10. tcp ip and do d model
10. tcp ip and do d model10. tcp ip and do d model
10. tcp ip and do d model
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptx
 
Ch4 Protocols.pptx
Ch4 Protocols.pptxCh4 Protocols.pptx
Ch4 Protocols.pptx
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 
file transfer and access utilities
file transfer and access utilitiesfile transfer and access utilities
file transfer and access utilities
 
บทที่ 2 โพรโตคอล (protocol)
บทที่  2 โพรโตคอล (protocol)บทที่  2 โพรโตคอล (protocol)
บทที่ 2 โพรโตคอล (protocol)
 
An overview of ftp
An overview of ftpAn overview of ftp
An overview of ftp
 
Networking:) Based on Ethical Hacking And Cyber Security
Networking:) Based on Ethical Hacking And Cyber SecurityNetworking:) Based on Ethical Hacking And Cyber Security
Networking:) Based on Ethical Hacking And Cyber Security
 
Chapter11 -- networking with tcpip and the internet
Chapter11  -- networking with tcpip and the internetChapter11  -- networking with tcpip and the internet
Chapter11 -- networking with tcpip and the internet
 
Networking Fundamentals
Networking Fundamentals Networking Fundamentals
Networking Fundamentals
 
Tcpip
TcpipTcpip
Tcpip
 
FILE TRANSFER PROTOCOL BY LAXMI $ Group
FILE TRANSFER PROTOCOL BY LAXMI $ GroupFILE TRANSFER PROTOCOL BY LAXMI $ Group
FILE TRANSFER PROTOCOL BY LAXMI $ Group
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocol
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
Web tcp ip
Web tcp ipWeb tcp ip
Web tcp ip
 
Osi model slides
Osi model slidesOsi model slides
Osi model slides
 
Linux Servers.pptx
Linux Servers.pptxLinux Servers.pptx
Linux Servers.pptx
 
Overview of tcp ip
Overview of tcp ipOverview of tcp ip
Overview of tcp ip
 
Socket programming with php
Socket programming with phpSocket programming with php
Socket programming with php
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Network communication