LeetDesign
← All problems
Medium

Design an Image Hosting Service

Upload once, view a billion times. Petabytes of blobs behind a hot set no RAM tier can hold — the problem where the edge does the serving and the database is the wrong tool.

Design a service that hosts images: upload once, then serve the link anywhere.

The library is petabyte-scale — billions of images at hundreds of kilobytes each — and viewing dwarfs uploading by hundreds to one. Images are immutable once uploaded and takedowns may lag by minutes, so the read side is as cacheable as data gets. But the hot set alone is terabytes: no memory tier holds it, and no relational database wants the blobs. Where you put the bytes, and what stands between them and the internet, is the whole problem.