Welcome back for part two of assets, static files, browser delivery, and Propshaft! In part one we talked about the local piece of the puzzle: where t

How CDNs Work (Propshaft / Static Assets Pt. 2)

submited by
Style Pass
2024-10-11 08:30:03

Welcome back for part two of assets, static files, browser delivery, and Propshaft! In part one we talked about the local piece of the puzzle: where to put files, how Propshaft moves them around, what fingerprinting is, and where static files ultimately end up! If you don’t feel confident around any of those topics, take a few minutes to go back and read part one, “How Propshaft Works: A Rails Asset-Pipeline (Visual) Breakdown”.

What we want to talk about today is more of the zoomed-out view, particularly in a production environment. Propshaft fingerprints our assets/ files and shoves them into public/… but then what?

Let’s suppose we have an application we just spun up on a cloud somewhere (more on that later). And let’s suppose we’ve bound it to the domain example.com. It’s a simple app — maybe just a static-content blog (like the one you’re reading now) or some other simple Rails MVC setup. Nothing complicated!

Regardless of where and how the app is spun up on the cloud (hold that thought!), we’re talking about assets and Propshaft in this series… so we must ask the first question: how are assets fetched from said app?

Leave a Comment
Related Posts