Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go for speed
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Nick Bruun
September 18, 2014
Programming
150
0
Share
Go for speed
A look at a use case for Go at Iconfinder, which shaved ~40 ms off asset load times.
Nick Bruun
September 18, 2014
More Decks by Nick Bruun
See All by Nick Bruun
The evolution of the Web stack
nickbruun
0
200
Getting to the post-industrial age of DevOps
nickbruun
2
160
At løbe med sakse (Danish)
nickbruun
1
220
Lessons learned defying Joel Spolsky with Django
nickbruun
145
35k
Other Decks in Programming
See All in Programming
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
250
Don't Prompt Harder, Structure Better
kitasuke
0
770
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
410
The Less-Told Story of Socket Timeouts
coe401_
3
310
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
130
Angular Signal Forms
debug_mode
0
110
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
240
感情を設計する
ichimichi
5
1.5k
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
270
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
120
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.3k
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
200
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
sira's awesome portfolio website redesign presentation
elsirapls
0
220
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
490
Evolving SEO for Evolving Search Engines
ryanjones
0
180
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
BBQ
matthewcrist
89
10k
The Language of Interfaces
destraynor
162
26k
Chasing Engaging Ingredients in Design
codingconduct
0
170
Building Flexible Design Systems
yeseniaperezcruz
330
40k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
200
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
380
Transcript
Go for speed
Nick Bruun github.com/nickbruun @nickbruun bruun.co CTO @ Iconfinder Fairly carnivorous
None
None
None
Trouble in icon paradise
None
None
None
None
41 ms average response time from Django application during peak
hours
~2,000 ms wasted per search
Perceivably slower
The internals
None
Icon ID Icon version ID Raster size https://www.iconfinder.com/icons/298255/677266/128/raster https://cdn0.iconfinder.com/data/icons/seo-smart-pack/128/ grey_new_seo2-43-128.png
Public raster URL Protected raster URL
None
Constant
Signing requests
https://www.iconfinder.com/icons/298255/677266/128/raster?token=…
None
we know if the user has access right now When
returning the link,
we know if the user has access right now When
returning the link,
We’re okay with “right now” being an approximation
Time limited token
<token secret> = "<expiration timestamp>-<session ID>-<nonce>-<URL>"
<token secret> = "<expiration timestamp>-<session ID>-<nonce>-<URL>" <signature> = hmac_sha1(<token secret>,
<shared secret>)
<token secret> = "<expiration timestamp>-<session ID>-<nonce>-<URL>" <signature> = hmac_sha1(<token secret>,
<shared secret>) <token> = "<expiration timestamp>-<nonce>-base64(<signature>)"
But, who checks the token?
Enter Go The World’s least Google-able language… from Google
None
Why Go?
Networked service
Highly concurrent ~3,000 requests/second from 100 connections/core
Low memory footprint 14.09 MiB after 21 days
Low CPU usage
Static binary Cross-compilation = deployment heaven
Less decisions to make
Caveats
Structured logging
DIY
Mature runtime != Mature language
Conciseness 608 lines of code
The end result
1.2 ms average response time at peak hours
0.1 % CPU usage at peak hours
Go is awesome
Go is awesome for simple services
Go is a trade-off
Go is a trade-off – choose wisely
return