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 Lisbon 2014
Search
Marco Cecconi
September 26, 2014
Programming
4
400
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
870
L'architettura di Stack Overflow, {codemotion} Milano 2014
sklivvz
0
570
Stack Overflow - it's all about performance
sklivvz
2
680
Guerrilla Programming - code.talks 2014
sklivvz
0
580
The Architecture of Stack Overflow - Info Share 2014
sklivvz
3
620
The Architecture of Stack Overflow - Dev Sum 2014
sklivvz
2
530
The Architecture of Stack Overflow - QCon Japan 2014
sklivvz
2
210
The Architecture of StackOverflow - QCon China 2014
sklivvz
1
240
The Localization of Stack Overflow- QCon China 2014
sklivvz
1
270
Other Decks in Programming
See All in Programming
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
510
Amazon Aurora Serverless v2が意外と高かった話と、AWS Database Migration Serviceの話
satoshi256kbyte
1
110
2024 コーディング研修
ckazu
2
640
ts-morphを使ってコードリプレイスとASTへのハードルを下げる!
nyawach
5
320
酒飲んでたらテックリードになった話
spbaya0141
0
210
CDKコントリビュートの最初の壁を越えよう! -簡単issueの見つけ方-
badmintoncryer
3
420
Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50
utgwkk
6
2k
TypeScriptのパフォーマンス改善
yajihum
14
5k
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
2.7k
Open standards for building event-driven applications in the cloud
meteatamel
0
230
TypeScriptから始める VR生活
tamagokakeg
2
110
Fragment Composition of GraphQL
quramy
14
1.7k
Featured
See All Featured
Building Effective Engineering Teams - LeadDev
addyosmani
33
1.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
67
14k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
15
1.6k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
Teambox: Starting and Learning
jrom
128
8.4k
Happy Clients
brianwarren
92
6.4k
The Power of CSS Pseudo Elements
geoffreycrofte
62
5k
A Philosophy of Restraint
colly
197
16k
Git: the NoSQL Database
bkeepers
PRO
423
63k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
KATA
mclloyd
16
12k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
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!