$30 off During Our Annual Pro Sale. View Details »
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
140
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
180
Getting to the post-industrial age of DevOps
nickbruun
2
150
At løbe med sakse (Danish)
nickbruun
1
210
Lessons learned defying Joel Spolsky with Django
nickbruun
145
35k
Other Decks in Programming
See All in Programming
エディターってAIで操作できるんだぜ
kis9a
0
650
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
400
Media Capture and Streams: W3C仕様と現場での知見
nowaki28
0
130
WebRTC と Rust と8K 60fps
tnoho
2
1.9k
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
260
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
210
認証・認可の基本を学ぼう前編
kouyuume
0
150
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
140
React Native New Architecture 移行実践報告
taminif
1
130
AWS CDKの推しポイントN選
akihisaikeda
1
240
tparseでgo testの出力を見やすくする
utgwkk
1
130
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
230
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Statistics for Hackers
jakevdp
799
230k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Why Our Code Smells
bkeepers
PRO
340
57k
Designing Experiences People Love
moore
142
24k
GraphQLとの向き合い方2022年版
quramy
50
14k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How STYLIGHT went responsive
nonsquared
100
5.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Faster Mobile Websites
deanohume
310
31k
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