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
The Architecture of Stack Overflow - Merge Lisb...
Search
Marco Cecconi
September 26, 2014
Programming
4
410
The Architecture of Stack Overflow - Merge Lisbon 2014
The Architecture of Stack Overflow slides from Merge Lisbon 2014
Marco Cecconi
September 26, 2014
Tweet
Share
More Decks by Marco Cecconi
See All by Marco Cecconi
Stack Overflow - It's all about performance - Codemotion Rome 2015
sklivvz
0
880
L'architettura di Stack Overflow, {codemotion} Milano 2014
sklivvz
0
650
Stack Overflow - it's all about performance
sklivvz
2
700
Guerrilla Programming - code.talks 2014
sklivvz
0
640
The Architecture of Stack Overflow - Info Share 2014
sklivvz
3
640
The Architecture of Stack Overflow - Dev Sum 2014
sklivvz
2
610
The Architecture of Stack Overflow - QCon Japan 2014
sklivvz
2
230
The Architecture of StackOverflow - QCon China 2014
sklivvz
1
250
The Localization of Stack Overflow- QCon China 2014
sklivvz
1
370
Other Decks in Programming
See All in Programming
カオスに立ち向かう小規模チームの装備の選択〜フルスタックTSという装備の強み _ 弱み〜/Choosing equipment for a small team facing chaos ~ Strengths and weaknesses of full-stack TS~
bitkey
1
150
Ruby で作る RISC-V CPU エミュレーター / RISC-V CPU emulator made with Ruby
hayaokimura
5
1.2k
エンジニアが挑む、限界までの越境
nealle
1
330
flutter_kaigi_mini_4.pdf
nobu74658
0
160
ドメイン駆動設計とXPで支える子どもの未来 / Domain-Driven Design and XP Supporting Children's Future
nrslib
0
310
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
140
個人開発の学生アプリが企業譲渡されるまで
akidon0000
2
1.2k
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
110
LRパーサーはいいぞ
ydah
7
1.4k
生成AI時代のフルスタック開発
kenn
7
920
Boast Code Party / RubyKaigi 2025 After Event
lemonade_37
0
110
20250426 GDGoC 合同新歓 - GDGoC のススメ
getty708
0
120
Featured
See All Featured
A Tale of Four Properties
chriscoyier
159
23k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
How GitHub (no longer) Works
holman
314
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
710
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
800
Transcript
The Architecture Of Marco Cecconi @sklivvz http://sklivvz.com
Sizing up the problem
None
None
None
*source: Quantcast, Alexa #50-‐ish network for traffic* (between imdb.com
and t.co)
#50-‐ish network for traffic* …and #17 in Portugal!?
*source: Quantcast, Alexa much successful very traffic obrigado, yo!
543,255,552 pageviews in the last 30 days* *source: Quantcast
Our datacenter?
None
web servers load balancers redis search database http(s) http rest
http protobuf sql sql protobuf tag engine
None
We are sNll scaling up!
Our development cycle
BAT!CAVE Code-build-test cycle running on home machine feature requests
BAT!CAVE DEV.SO Test on the real servers git push
BAT!CAVE DEV.SO META.SE 1-click deploy Users test on meta.stackexchange.com (“baking”)
git push
BAT!CAVE DEV.SO META.SE 1-click deploy HALP! git revert git push
BAT!CAVE DEV.SO NETWORK META.SE 1-click deploy git push 1-click deploy
It’s live! Tons of users use it…
BAT!CAVE DEV.SO NETWORK META.SE 1-click deploy git push 1-click deploy
…and provide new feature requests
Move fast and break things* * Not the home
page or question page :-)
Move fast and break things* * Not the home
page or question page :-)
Abusing caching
Network Level Caches (CDN, etc.) Server Level Cache (HttpRuntime.Cache) Site
Level Cache (Redis) SQL Server Database Cache (384 gigs of RAM!) Solid State Disk
None
None
None
RisoQo & SpagheS
None
None
None
None
None
Throwing away risotto… one grain at a time!
Abuse caching for GC performance
IRepository<Order> orderRepository = container.Resolve<IRepository<Order>>();
Order order = orderRepository.Get(35); This is what you think you are doing…
…but if you think about it a bit more…
...this is what you are actually doing! IRepository<Order> repository =
new ValidatingOrderRepository ( new SecurityRepository<Order> ( new LoggingRepository<Order> ( new CachingRepository<Order> ( new NHibernateRepository<Order> () ) ) ) ); Order order = repository.Get(35);
Throwing away spaghetti… one strand at a time!
Dependency InjecNon is our version of spagheS code
Our source code
Few projects :-)
Few projects :-) Few lines of code :-)
Few projects :-) Few lines of code :-) Eeek! very
few tests :-S
Few projects :-) Few lines of code :-) Awesome community
to help :-D Eeek! very few tests :-S
YAGNI* * You Ain’t Gonna Need It!
Libraries and open source
None
None
None
Wrap code in libraries and open source it
None
None
None
“SUPERHERO” CODING
HIRE “NINJA” CODERS
TOOLS LEVEL: “NINJA”
• Performance is a feature • Always.
Be. Shipping. • Use your circumstances. • Open source your libraries • 3 obscenely big monitors. KEY TAKEAWAYS
None
Marco Cecconi @sklivvz http://sklivvz.com we are hiring new ninjas from
anywhere in the world!