Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Optimize Rails Asset Pipeline Deployment
Search
Cam Huynh
October 11, 2015
Technology
83
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Optimize Rails Asset Pipeline Deployment
Cam Huynh
October 11, 2015
More Decks by Cam Huynh
See All by Cam Huynh
Reddit Ruby Conf 2016 Recap
hqc
0
130
FutureWorkz DevOps Workshop Day II - Deploying Rails
hqc
0
68
FutureWorkz DevOps Workshop Day III - Gitlab Runner for CD
hqc
0
110
Futureworkz DevOps Workshop Day 1 - DevOps ToolChain
hqc
0
84
FutureWorkz DevOps Workshop Intro
hqc
1
71
Rack for beginners
hqc
0
81
Chat Implementation with RESTful (Ruby) and Web Socket
hqc
0
72
Monkey patching in Ruby
hqc
0
310
Other Decks in Technology
See All in Technology
Apache Iceberg が拓く AI 時代のオープンレイクハウス
tomtanaka
0
210
[2026 Oracle Technical Deep Dive] オンプレミスDBのCloud移行アプローチ:移行計画に基づくメソッドとツールの選択 (2026年9月17日開催)
oracle4engineer
PRO
0
110
顧客の成果創出とプロダクトの成長を 両立するためのFDE
sansantech
PRO
0
630
Incremental HTTP
kazuho
5
2k
認知負荷を吸収し、プロダクトをまたぐPR Preview基盤の設計事例
taiki45
2
570
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
140
OpenClawでAzure DevOpsのWiki更新を自動化する - クラウドAIだけでは届かない場所へ
yutakaosada
0
140
「とりあえず動く」の先へ。 AI時代のチーム開発と内部設計/2026-slsdays
slsops
0
110
Swap and Memory Reclaim - Squeezing Out More RAM
ennael
PRO
1
1.5k
1人アドミンな私はAWSアカウント申請をSlackで完結したい!
ysuzuki
0
110
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
260
[2026 Oracle Technical Deep Dive] エンタープライズAIエージェントを支えるOCIソリューション。ラインナップと特徴を理解しよう! (2026年9月17日開催)
oracle4engineer
PRO
0
280
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Everyday Curiosity
cassininazir
0
340
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Being A Developer After 40
akosma
91
590k
Optimising Largest Contentful Paint
csswizardry
37
4k
Tell your own story through comics
letsgokoyo
1
1.1k
Designing for Performance
lara
611
70k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
550
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
520
The agentic SEO stack - context over prompts
schlessera
0
950
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
960
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
260
Transcript
ASSET PIPELINE OPTIMIZATION by @huynhquancam
WHAT SHOULD YOU KNOW ABOUT THIS GUY? My name is
Huynh Quan Cam. Responsible for the development and engineering of Dadadee.
WHAT’S THE TALK ABOUT? Rails Assets pipeline. Deploy assets pipeline
on multiple servers. How to optimize the deployment?
ASSETS PIPELINE concatenate and minify or compress JavaScript and CSS
assets. support pre-processors such as CoffeeScript, Sass and ERB. based on Sprockets.
USING ASSET PIPELINE
– The Rails core team. “TIPS OF THE DAY” You
can get rid of sprockets by executing this command at the start. rails new my-awesome-app-without-sprockets --skip-sprockets
SITUATION we are deploying an Rails app to four servers:
2 web, 1 database and 1 worker. db and worker servers need static assets to work. zero-down time deployment and rollback required.
CAPISTRANO-RAILS capistrano-rails is a set of Capistrano tasks to automate
Rails deployment. migrations. assets pre-compilation.
ORCHESTRATION SCRIPT
WHAT’S WRONG WITH THIS APPROACH? waste of time. waste of
computing resources. waste of storage resources, especially when you’re using CDNs like CloudFront.
Can we only pre-compile once?
ASSET FINGERPRINTS generated based on file content. optimize client-side caching.
better cache invalidation.
ASSET FINGERPRINT application.css application-908e25f4bf641868d8683022a5b62f54.css application.css application-723d1be6cc741a3aabb1cec24276d681.css
ASSET MANIFEST a manifest-<md5-hash>.json cache every fingerprint of your Rails
static assets. accelerate Rails helper call.
ASSET MANIFEST
NOTES fingerprints only change if file contents change. fingerprints don’t
change across servers. all fingerprint requests are handled by manifest file.
Pre-compile once and sync the manifest file to others.
IMPLEMENTATION
IMPLEMENTATION
QUESTIONS?
THANK YOU!