> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How WhatsApp Shares Media

> Explains how WhatsApp stores and delivers encrypted media using blob storage, separate signaling, client-side encryption keys, and single-upload many-download efficiency while preserving privacy.

WhatsApp separates real-time chat signaling from large-file storage to provide fast messaging while preserving end-to-end encryption and bandwidth efficiency. Your phone keeps a persistent TCP connection to a chat server for text and signaling, but large photos and videos are stored and served from a distinct blob storage service (the “Blobstore”).

Below is a concise, step-by-step walkthrough of what happens when you send a 20 MB video to a friend (Alan), how recipients retrieve it, and why this architecture supports privacy and efficiency.

## Sending a video — step-by-step

1. Your phone compresses the original 20 MB video so it becomes smaller and faster to upload.
2. Your phone generates a unique encryption key and encrypts the compressed video locally (end-to-end encryption).
3. The encrypted file is uploaded to WhatsApp’s Blobstore — a specialized storage system optimized for large media.
4. After the upload completes, your phone receives an address (a URL or blob identifier) that points to the encrypted object in Blobstore.
5. Your phone sends a regular chat message via the chat server to Alan. That message contains:
   * The Blobstore address (URL/blob identifier) of the encrypted video.
   * The encryption key needed to decrypt the video.
   * A small blurry thumbnail so Alan sees that a video has been sent immediately.

![A dark schematic showing two smartphones and a chat flow where a 20 MB video (play icon) is compressed to 3.4 MB before being sent via a chat server.](https://mintcdn.com/kodekloud-c4ac6d9a/2h0o-_DtLcLu6HM7/images/DevOps-Interview-Questions-and-Answers-Scenario-Based-Prep/System-Design/How-WhatsApp-Shares-Media/video-compression-20mb-to-3point4mb-chat.jpg?fit=max\&auto=format\&n=2h0o-_DtLcLu6HM7\&q=85\&s=c99d39febb3608337defafc97ae959ab)

## What happens on the recipient’s device

When Alan’s phone receives the chat message:

* The blurry thumbnail (attached to the chat message) is displayed immediately.
* If Alan taps to view or download the full video:
  * His phone uses the Blobstore address in the chat message to download the encrypted video directly from Blobstore.
  * His phone uses the encryption key included in the end-to-end encrypted chat message to decrypt the video locally.

## Design implications — privacy, control, and performance

This design produces a number of observable behaviors and guarantees:

| Component | What it stores/handles | Security / behavior notes |
| - | - | - |
| Chat server | Text messages and signaling | Carries the encryption key inside end-to-end encrypted messages but does not host large media files. |
| Blobstore | Encrypted media blobs (photos/videos) | Stores only ciphertext — it never receives the decryption key. |
| Sender & Recipient devices | Encryption & decryption | Keys are generated and used locally; decryption happens on the recipient's device. |

Key user-visible consequences:

* The Blobstore holds only the encrypted file; it never receives the decryption key.
* The encryption key travels only in the end-to-end encrypted chat message between sender and recipient, so WhatsApp’s servers cannot decrypt the media.
* The phone’s network settings (e.g., “download on Wi‑Fi only”) control when the encrypted file is fetched from Blobstore; the chat message and thumbnail still arrive via the chat server.

Because the decryption key is delivered inside the end-to-end encrypted chat message while the Blobstore keeps only ciphertext, WhatsApp’s servers cannot open or inspect the media content.

## Efficiency for groups and forwarding

* Single-upload, many-download: If you send the same video to a group of 200 people, your phone uploads the encrypted file to Blobstore once. Each recipient downloads that same encrypted blob from Blobstore.
* Retention and deduplication: WhatsApp keeps an encrypted file in Blobstore for up to 30 days. This retention prevents repeated re-processing or re-uploading when recipients forward the same file: the platform can reuse the existing blob rather than creating duplicates.

![A stylized diagram showing three phones (labeled You, Alan, Mia) sending and retrieving a media file through a central chat server into a blob store. The blob storage holds media items (blobs) with a 30-day retention note.](https://mintcdn.com/kodekloud-c4ac6d9a/2h0o-_DtLcLu6HM7/images/DevOps-Interview-Questions-and-Answers-Scenario-Based-Prep/System-Design/How-WhatsApp-Shares-Media/three-phones-chat-blobstore-30day-retention.jpg?fit=max\&auto=format\&n=2h0o-_DtLcLu6HM7\&q=85\&s=d914e780bc276f375d327d053a123776)

WhatsApp also enforces forwarding limits and other content-moderation policies to reduce viral spread and abuse. Combined with the single-upload + many-download architecture, these policies balance bandwidth efficiency, user privacy (via end-to-end encryption), and operational simplicity.

## Quick reference

* Term: Blobstore — scalable storage for large encrypted media objects.
* Encryption model: Client-side encryption (keys shared inside end-to-end encrypted chat messages).
* Retention: Encrypted blobs are typically retained up to 30 days to support forwarding and reduce duplicate uploads.
* Network control: Chat messages (and thumbnails) arrive over the persistent connection; large encrypted blobs are fetched separately and according to the device’s network settings.

## Links and references

* [WhatsApp Security Overview](https://www.whatsapp.com/security/)
* [WhatsApp FAQ on end-to-end encryption](https://faq.whatsapp.com/general/security-and-privacy/about-end-to-end-encryption)

> [card] [Watch Video](https://learn.kodekloud.com/user/courses/devops-interview-prep/module/ef53ec43-96e9-4d1b-8a6e-e6eb97b0d0dc/lesson/77a24a71-99f2-43f5-b75b-4ac20abfcac7)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.