Important Network protocol
Application layer
- Client-Server
- HTTP(connection oriented built on top of TCP)
- FTP (file transfer protocol),
- Two connection are created i.e control-connection and data connection.
- The connection is not secured over the data connection, hence FTP is not secure
- SMTP (used along with IMAP(Internet mail access protocol))
- Smtp: to send the mail
- Imap: to read/access the mail
- Web-Socket
- Web-Socket(bi-directional communication: meaning: client can talk to server and server can talk to client)
- But, websocket is not peer to peer
- Web-Sockets is used when we have to design messaging application like whatsapp, where client sends the message to server (client initialized) and server sends it to next client(server initialized)
- Build on top of TCP
- Peer to Peer
- webRTC: anyone can be client/server (due to this the client doesn't necessarily have to talk ot server it can talk to its peers to get the required data if the peer has it, this is one of the reason webRTC(build on top of UDP) is faster
Transport layer
-
TCP/IP
- Transmission Control Protocol
- Three way handshake connection
- Order of data packets are maintained
- Acknowledgements of each packet received
- Ensure the delivery of the data packets
- Reliable
-
UDP/IP: User Datagram Protocol
- Connection is not maintained
- Order of datagram is not ensured
- Data is transferred on multiple virtual connections
- Order of the datagram is not maintained
- No acknowledgement if the datagram is lost in transit due to connection lost
- Not reliable
- It is faster than TCP( since we are not maintaining the connection, not maintaining the order, no ack of lost/received packets)
- Used in live streaming, video calling (where consistency is not that important, i.e. users won't mind if fraction of second of data is lost or was dropped.)
- Hence WebRTC is used for such use cases which is built on top of UDP
Top comments (0)