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
Nick Bruun
September 18, 2014
Programming
0
150
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
Tweet
Share
More Decks by Nick Bruun
See All by Nick Bruun
The evolution of the Web stack
nickbruun
0
190
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
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
140
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
110
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
390
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
270
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
150
CSC307 Lecture 15
javiergs
PRO
0
250
CSC307 Lecture 14
javiergs
PRO
0
470
The free-lunch guide to idea circularity
hollycummins
0
200
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
960
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
330
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
310
Building Adaptive Systems
keathley
44
3k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
110
Music & Morning Musume
bryan
47
7.1k
The Spectacular Lies of Maps
axbom
PRO
1
620
Navigating Team Friction
lara
192
16k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
270
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
410
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
エンジニアに許された特別な時間の終わり
watany
106
240k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
260
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