The Application layer is where the protocols you actually use live: one fetches web pages, one moves files, three handle email, and one shares huge files between thousands of ordinary computers. Learn the purpose of each and, for email, which way each one pushes or pulls the message.
HTTP transfers web pages and their resources between a web server and a browser (HTTPS is HTTP made secure by encryption). FTP transfers files between a client and a server. Email uses three protocols: SMTPpushes an email from the sender's client to their mail server and on to the recipient's mail server; POP3 and IMAP let the recipient pull it from their server. POP3 downloads the email (usually deleting the server copy); IMAP keeps it on the server so every device stays in sync. BitTorrent is a peer-to-peer protocol: a file is split into pieces and each peer in a swarm downloads different pieces from many other peers at once while uploading the pieces it already has.
Fig. 1: SMTP pushes an email to the recipient's mail server; POP3 or IMAP pulls it to the recipient's device
Section 01
Web pages and files.
In the lab, switch to Protocols and click each one to see what it moves and in which direction.
Protocol
Purpose
How it works
HTTP (HyperText Transfer Protocol)
transfers web pages and their resources (HTML, images, scripts) between a web server and a browser
the browser sends a request (e.g. GET for a page, POST to send form data); the server sends a response with a status code (200 OK, 404 Not Found) and the content; usually port 80
HTTPS
secure version of HTTP
the HTTP messages are encrypted using SSL/TLS, so they cannot be read if intercepted; the server proves its identity with a digital certificate; usually port 443
FTP (File Transfer Protocol)
transfers files between a client and a server over a network: upload, download, rename and delete files in a directory structure
the client logs on (username and password, or anonymous access); commands are sent on a control connection (port 21) and files on a separate data connection; can transfer in binary or text mode
Examiner trap
HTTP is not "the internet" and not "how web pages are displayed". It is the set of rules for requesting and transferring web resources between a client and a web server; the browser renders the page.
Section 02
Three email protocols.
Email needs a push protocol to send and a pull protocol to collect. Follow the arrows in Fig. 1.
SMTP
POP3
IMAP
Full name
Simple Mail Transfer Protocol
Post Office Protocol version 3
Internet Message Access Protocol
Direction
push: sends email
pull: retrieves email
pull: retrieves email
Between
sender's client and mail server; mail server and mail server
recipient's mail server and client
recipient's mail server and client
Where email is kept
-
downloaded to one device; usually deleted from the server
stays on the server; the client shows a synchronised copy
Suits
every email sent
one device, reading offline, little server storage
several devices (phone, laptop, webmail) that must all show the same inbox and folders
Worked example Choose the retrieval protocol
A sales manager reads email on a phone, a tablet and an office PC, and wants an email read or moved to a folder on one device to show as read or moved on all of them. POP3 or IMAP?
With POP3 the email is downloaded to one device and usually deleted from the server, so the other devices never see it.
With IMAP the email stays on the server; each device views the server copy.
Flags (read/unread) and folders are stored on the server, so every device stays in sync.
Answer: IMAP, because the email and its folders stay on the server and are synchronised across all devices
Your turn
Which protocol is used when the sender's mail server passes an email to the recipient's mail server?
SMTP. SMTP is used for every "push" step: client to server and server to server. POP3 and IMAP are only used for the recipient to collect the email.
Examiner trap
POP3 and IMAP are not used to send email. A common lost mark is writing "IMAP sends the email to the recipient": the recipient's client retrieves it.
Stage 1 · Learn
Check what the sim just showed you
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
Which protocol pushes an email from the sender's client to the sender's mail server?
Quick check+10 XP
Which is the key difference between POP3 and IMAP?
Quick check+10 XP
In the lab, what happens when peer 1 downloads a file using BitTorrent?
Quick check+10 XP
What is the purpose of FTP?
Section 03
BitTorrent: sharing peer to peer.
Downloading a huge file from one server is slow when thousands want it at once. BitTorrent turns every downloader into an uploader as well.
Pieces: the file is split into equal-sized pieces (e.g. 256 KiB). Each piece has a hash value so its integrity can be checked when it arrives.
Torrent file: a small file holding metadata: the file name and size, the piece size, the hash of every piece and the address of the tracker. A user opens it in a BitTorrent client.
Tracker: a server that keeps a list of the peers currently sharing the file. It does not hold the file; it only tells a new peer which other peers to connect to.
Swarm: all the peers sharing the same file. A seed (seeder) has the complete file and only uploads; a leecher is still downloading and uploads the pieces it already has.
Downloading: a peer requests different pieces from many peers at the same time, in any order (often the rarest pieces first). Each piece is checked against its hash and, once complete, the peer can upload it to others. When all the pieces are present they are joined to rebuild the file.
Benefits: no single server has to supply everyone, so it scales: the more peers want the file, the more peers upload it. There is no single point of failure for the file itself.
Drawbacks: a file may be unavailable if there are not enough seeds; it uses the user's upload bandwidth; it is often used to share copyrighted material illegally; files from unknown peers may contain malware.
Worked example Counting pieces
A 6 MiB file is shared using BitTorrent with a piece size of 256 KiB. How many pieces is it split into?
Convert to the same unit: 6 MiB = 6 x 1024 KiB = 6144 KiB.
Divide by the piece size: 6144 / 256 = 24.
So the torrent file holds 24 piece hashes, and a peer can fetch the 24 pieces from up to 24 different peers.
Answer: 24 pieces
Your turn
Explain why a file shared using BitTorrent usually downloads faster when it becomes more popular, while a file on a single web server usually downloads more slowly.
With BitTorrent each new peer also uploads the pieces it has, so more peers means more sources to download from at the same time. A single server has a fixed upload capacity that is shared between more and more users.
Examiner trap
The tracker does not store or send the file. It only coordinates the swarm by telling peers about each other; the pieces travel directly between peers.
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to A Level Paper 3 and Paper 4 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
What is the role of the tracker in BitTorrent?
Exam style+20 XP
In BitTorrent, what is a seed?
Exam style+20 XP
A student reads email on a laptop and a phone and wants both to show the same folders. Which protocol should the email client use?
Exam style+20 XP
What does HTTPS add to HTTP?
Skill unlocked
Application protocols, mastered.
This skill is now recorded on your profile. Keep the chain going.