Library / Case Studies
Image Recovery at Scale Using S3 Versioning at Trivago
If you’re using Amazon Web Services, then there is a higher possibility that you’re familiar with Amazon S3. Amazon S3 ( Simple Storage Service ) is a wid...
By Trivago engineers · Trivago · Added 2026-10-12
All content belongs to Trivago engineers / Trivago. We only link to it and give credit. Report a problem
Learn this case study
About 37 min left. Your work is saved as you go.
What you are about to study
Trivago explains a real system. You should know the basics: caching, queues and replication.
Ideas you will meet
- Distributed Systems
- Consensus, time, failure and the fundamentals of scale-out.
What we already know about this
Our own lessons on these ideas. Read them here before you start, so it makes sense.
Real-World Systems · 10 minHow a browser turns a URL into a pageFrom the address bar to pixels: navigation, parsing, the render pipeline, JavaScript, and what makes pages fast or slow.Read here
From address bar to HTML
When you press Enter on
https://example.com/page:- The browser decides if it is a URL or a search, and checks its caches (HTTP cache, service worker).
- DNS turns the name into an IP address; a TCP connection and TLS handshake follow (with HTTP/3, QUIC does both at once). See the networking lessons.
- It sends an HTTP request and receives the HTML response, streaming in as it arrives.
A multi-process program
Modern browsers run as several processes for speed and safety:
- a browser process (address bar, tabs, navigation),
- a renderer process per site or tab (parsing, JavaScript, layout, painting),
- a network process, and a GPU process for drawing.
A crashing or malicious page is isolated in its own renderer and cannot read other sites' data.
The rendering pipeline
100%Figure SDA-RWS-11-1 · Browser rendering pipeline · © forcsguy.com
- Parse HTML into the DOM (a tree of elements). Parsing is incremental: the browser starts working before the whole file arrives.
- Parse CSS into the CSSOM. Rendering waits for CSS, because showing unstyled content then restyling would flash. CSS is render-blocking.
- Combine into the render tree (only visible elements, with computed styles).
- Layout works out the size and position of every box.
- Paint draws the boxes into layers.
- Composite: the GPU assembles layers into the final image. Animating a layer's
transformoropacityonly needs this last step.
JavaScript on the main thread
- JavaScript runs on the renderer's main thread, one task at a time in an event loop, alongside parsing, layout and input handling. A long script blocks everything, and the page feels frozen.
- A normal
<script>is parser-blocking: parsing stops until it downloads and runs. Usedefer(run after parsing, in order) orasync(run as soon as available) for scripts not needed to build the first view. - Changing the DOM or styles can trigger reflow (layout again) and repaint. Reading layout values in a loop right after writing styles forces repeated layout (layout thrashing): batch reads and writes.
What makes pages fast
Goal Techniques Less to download Compression (brotli, gzip), image optimisation and modern formats, remove unused JavaScript Fewer round trips CDN, HTTP/2 and 3, preconnect, caching with long lifetimes and versioned namesLess blocking Inline critical CSS, deferscripts, avoid huge CSS and fonts blocking textSmooth interaction Break up long tasks, move heavy work to web workers, animate with transformandopacityLoad only what is visible Lazy-load images and routes Browsers also cache, preload likely navigations, and can run offline logic with service workers.
Measuring
Use the Core Web Vitals: LCP (when the main content appears), INP (responsiveness to input) and CLS (unexpected layout shifts). Check both lab tests and real-user data, because real devices and networks are slower and more varied than a developer laptop.
Real-world reading
Related reading
- Chrome Developers BlogGoogle engineers · GoogleBlogs
- Android Developers BlogGoogle engineers · GoogleBlogs
- The Road to QUICCloudflareBlogs
- Julia Evans' BlogJulia Evans · jvns.caBlogs
Show 6 moreShow fewer
- Cloudflare BlogCloudflare engineers · CloudflareBlogs
- RFC 9000: QUICIETFDocumentation
- Cloudflare EngineeringCloudflare engineers · CloudflareBlogs
- Web VitalsGoogle web.dev · GoogleDocumentation
- Curalate Engineering BlogCuralate engineers · CuralateBlogs
- Zapier Engineering BlogZapier engineers · ZapierBlogs
Go deeper on this
A path through videos, articles, other case studies and code on the same ideas as Image Recovery at Scale Using S3 Versioning at Trivago.
Warm upGet the vocabulary first.
Books · Free from the author
Concurrent and Distributed Systems (Cambridge lecture notes)
Eight lectures on time, broadcast, replication, consensus and transactions, with notes, slides and video. Free from the author under CC BY-SA.
University of CambridgeIntermediate
Books · Free from the author
Computer Networks: A Systems Approach
How networks are built and why: protocols, routing, congestion control and the internet's architecture. The authors publish it free online under CC BY 4.0.
Systems ApproachIntermediate
WatchHow others solve the same problem, on video.
Videos belong to their creators and play from YouTube. More on YouTube (opens in a new tab)
ReadEngineers explain it in their own words.
Blogs · Free from the author · Read here
Scalable Web Architecture and Distributed Systems
A full chapter on the building blocks of large websites: availability, performance, reliability, scalability, caches, proxies, indexes, load balancers and queues. Free to read here under CC BY 3.0.
The Architecture of Open Source ApplicationsBeginner40 min
Papers · Read here
Facebook’s photo storage
This paper describes Haystack, an object storage system optimized for Facebook’s Photos application. Facebook currently stores over 260 billion images, which translates to over 20 petabytes of data.
USENIXIntermediate
See it in another companyThe same ideas, a different system.
Case Studies · Read here
Aroma: Using ML for Code Recommendation at Facebook
Thousands of engineers write the code to create our apps, which serve billions of people worldwide. This is no trivial task—our services have grown so diverse and complex that the codebase contains…
FacebookIntermediate
Case Studies · Read here
Brooklin: Distributed Service for Near Real-Time Data Streaming at LinkedIn
Brooklin—a distributed service for streaming data in near real-time and at scale—has been running in production at LinkedIn since 2016, powering thousands of data streams and over 2 trillion messages per day. Today, w...
LinkedInIntermediate
Read the codeSee how it looks when it is real.
GitHub
Engineering Blogs
A huge directory of company engineering blogs to learn from real production systems.
kilimchoiIntermediate
GitHub
Awesome Scalability
Curated reading list of articles on the architecture of scalable, reliable systems.
binhnguyennusIntermediate
Keep learning
Loading community…