Prerequisites – HTTP, FTP, and SMTP
HTTP stands for Hyper Text Transfer Protocol, FTP for File Transfer Protocol, while SMTP stands for Simple Mail Transfer Protocol. All the three are used to transfer information over a computer network, and are an integral part of today’s internet.
Why do we need three Protocols for transferring files?
We need the three protocols as they all serve different purposes. These are HTTP, FTP, and SMTP.
- HTTP is the backbone of World Wide Web (WWW). It defines the format of messages through which Web Browsers (like Firefox, Chrome) and Web Servers communicate, whilst also defining how a web browser should respond to a particular web browser request.
- FTP is the underlying protocol that is used to, as the name suggests, transfer files over a communication network. It establishes two TCP connections: Control Connection to authenticate the user, and Data Connection to transfer the files.
- SMTP is what is used by Email servers all over the globe to communicate with each other, so that the assignment you submitted at 11:59 pm reaches your professor’s inbox within the deadline.
How do their implementations differ?
All the three are Application Layer Protocols, using TCP as the underlying Transport layer protocol. But the way they use it, and are implemented in general, is vastly different. The below table briefly differentiates between them.
|Port number||80||20 and 21||25|
|Type of band transfer||In-band||Out-of-band||In-band|
|Number of TCP connections||1||2 (Data Connection and Control Connection)||1|
|Type of TCP connection||Can use both Persistent and Non-persistent||Persistent for
|Type of Protocol||Pull Protocol (Mainly)||–||Push Protocol (Primarily)|
|Type of Transfer||Transfer files between Web server and Web client||Transfer directly between computers||Transfers mails via Mail Servers|
- FTP is Out-of-band, as it uses a separate channel to send data (Data connection), as to send control information (Control connection).
- As SMTP is much older that HTTP, it restricts all its messages to be in 7-bit ASCII format. Whereas HTTP has no such restriction.
- HTTP encapsulates each file in a different HTTP message. Whereas, SMTP places all the contents of a mail in a single message.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between SMTP and POP3
- Simple Mail Transfer Protocol (SMTP)
- SMTP Responses
- SMTP Commands
- Difference between TELNET and FTP
- Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
- Difference between FTP and TFTP
- Difference between Active and Passive FTP
- File Transfer Protocol (FTP) in Application Layer
- FTP Full Form
- Similarities and Differences between Ruby and C language
- Similarities and Differences between Ruby and C++
- Differences between Virtual Circuits and Datagram Networks
- Differences between TreeMap, HashMap and LinkedHashMap in Java
- Differences between JDK, JRE and JVM
- Differences between number of increasing subarrays and decreasing subarrays in k sized windows
- Differences between 8086 and 8088 microprocessors
- Software Engineering | Differences between Sanity Testing and Smoke Testing
- Differences between TCP and UDP
- Software Engineering | Differences between Coupling and Cohesion
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : ririyad