Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Stack Overflow - It's all about performance / Marco Cecconi (Stack Overflow)

3,888 views

Published on

Stack Overflow, and its Q&A network Stack Exchange, have been growing exponentially for the last five years. They now encompass
~150 Q&A sites
~9 million users
~13 million questions
~22 million answers

In this talk, I will describe:
+ The physical architecture of Stack Overflow. How many servers are there? What is their purpose and what are their specs?
+ The logical architecture of the software. How do we scale up? What are the main building blocks of our software?
+ The tooling system. What supports our extreme optimization philosophy?
+ The development team. What are our core values? What footprint do we want to leave as developers?

Published in: Engineering
  • Be the first to comment

Stack Overflow - It's all about performance / Marco Cecconi (Stack Overflow)

  1. 1. Marco Cecconi @sklivvz http://sklivvz.com
  2. 2. ARCHITECTURE? WHAT THE HECK IS THAT?
  3. 3. In the past 12 months • The Stack Exchange network grew from 130 to 150 sites (+15%) • US site rank for visitors of the whole network improved from #44 to #19 (-25 ranks)
  4. 4. Tight, tight, code cycles
  5. 5. BATCAVE Code-build-test cycle running on home machine feature requests
  6. 6. BATCAVE DEV.SO Test on the real servers git push
  7. 7. BATCAVE DEV.SO META.SE 1-click deploy Users test on meta.stackexchange.com (“baking”) git push
  8. 8. BATCAVE DEV.SO META.SE 1-click deploy HALP! git revert git push
  9. 9. BATCAVE DEV.SO NETWORK META.SE 1-click deploy git push 1-click deploy It’s live! Tons of users use it…
  10. 10. BATCAVE DEV.SO NETWORK META.SE 1-click deploy git push 1-click deploy …and provide new feature requests
  11. 11. Move fast and break things* * Not the home page or question page :-)
  12. 12. Move fast and break things* * Not the home page or question page :-)
  13. 13. “Normal” caching
  14. 14. Our frienemy: The Garbage Collector
  15. 15. Too many objects instantiated
  16. 16. Caching abuse
  17. 17. Compliler abuse
  18. 18. Framework abuse
  19. 19. Complex instance graph
  20. 20. Avoiding common patterns
  21. 21. IRepository<Order> orderRepository = container.Resolve<IRepository<Order>>(); Order order = orderRepository.Get(35); Dependency injection pattern
  22. 22. IRepository<Order> repository = new ValidatingOrderRepository ( new SecurityRepository<Order> ( new LoggingRepository<Order> ( new CachingRepository<Order> ( new NHibernateRepository<Order> () ) ) ) ); Order order = repository.Get(35);
  23. 23. A look at our source code
  24. 24. Automated TESTERS
  25. 25. What we do test: Open Source and Libraries
  26. 26. BOSS MODE CODE
  27. 27. BOSS MODE TOOLS
  28. 28. • Performance is a feature • Always. Be. Shipping. • Use your circumstances. • Open source your libraries • 3 obscenely big monitors. KEY TAKEAWAYS
  29. 29. Marco Cecconi @sklivvz http://sklivvz.com perl -wlne'BEGIN{$b=rand$=}$a=qw/To lzhk_kypam_yr_qryaimtcpdjmu_bmr_amk_enq_ghqhmf Cnvm/[($_<=>int$b)+1];$a=~y/a-zA-Z/b-zaB-ZA/;print $a'

×