1 Scaling Stack Overflow David Fullerton, VP QCon NYC 2015-06-12.

Slides:



Advertisements
Similar presentations
Fast Data at Massive Scale Lessons Learned at Facebook Bobby Johnson.
Advertisements

M2 – Explain the tools and techniques used in the creation of an interactive website. By Arturas Vitkovskij.
© Copyright 2012 STI INNSBRUCK Apache Lucene Ioan Toma based on slides from Aaron Bannert
Using the Optimizer to Generate an Effective Regression Suite: A First Step Murali M. Krishna Presented by Harumi Kuno HP.
Web Applications Development Using Coldbox Platform Eddie Johnston.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
Web Application Architecture Bird Book pp Client Server Model.
Enterprise Search With SharePoint Portal Server V2 Steve Tullis, Program Manager, Business Portal Group 3/5/2003.
WebQuilt and Mobile Devices: A Web Usability Testing and Analysis Tool for the Mobile Internet Tara Matthews Seattle University April 5, 2001 Faculty Mentor:
Capacity Planning in SharePoint Capacity Planning Process of evaluating a technology … Deciding … Hardware … Variety of Ways Different Services.
 What I hate about you things people often do that hurt their Web site’s chances with search engines.
By Bob Bunson  Simulation of software development project  Fictitious system from Concept to Code  Oriented around the.
SYSTEMS SUPPORT FOR GRAPHICAL LEARNING Ken Birman 1 CS6410 Fall /18/2014.
N-Tier Architecture.
How WebMD Maintains Operational Flexibility with NoSQL Rajeev Borborah, Sr. Director, Engineering Matt Wilson – Director, Production Engineering – Consumer.
Section 13.1 Add a hit counter to a Web page Identify the limitations of hit counters Describe the information gathered by tracking systems Create a guest.
Machine Learning at Orbitz Robert Lancaster and Jonathan Seidman Strata 2011 February 02 | 2011.
Building Public Facing Websites with SharePoint 2010 Prepared for ILTA’s SharePoint for Legal Symposium June 16 th, 2010 George Durzi Principal Consultant.
Cloud Computing for the Enterprise November 18th, This work is licensed under a Creative Commons.
by Marc Comeau. About A Webmaster Developing a website goes far beyond understanding underlying technologies Determine your requirements.
Facebook (stylized facebook) is a Social Networking System and website launched in February 2004, operated and privately owned by Facebook, Inc. As.
Chapter 16 The World Wide Web Chapter Goals ( ) Compare and contrast the Internet and the World Wide Web Describe general Web processing.
Real World Examples – Part II 7/26/2013Miro Remias, Sr. Solution Architect.
Scaling the Windows Stack George PICC ‘12.
GOOGLE ANALYTICS Destinee Cushing DIG 4104C Spring 2014.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
SharePoint Enterprise Aggregation Caching Feature Product Overview Nimrod Geva Product Group Manager, KWizCom
Web/App Performance How to keep you out of the News
CMPE 421 Parallel Computer Architecture
SYSTEMS SUPPORT FOR GRAPHICAL LEARNING Ken Birman 1 CS6410 Fall /18/2014.
Feeds Module for Drupal 7 Use Cases, Overview, and Walktroughs.
Computer Measurement Group, India Optimal Design Principles for better Performance of Next generation Systems Balachandar Gurusamy,
March 19981© Dennis Adams Associates Tuning Oracle: Key Considerations Dennis Adams 25 March 1998.
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
Master Thesis Defense Jan Fiedler 04/17/98
SharePoint 2010 Search Architecture The Connector Framework Enhancing the Search User Interface Creating Custom Ranking Models.
Mozilla Corporation Chris Hofmann Mozilla Test Day Sprint.
Using the Internet at City Hall FAST Internet Connections! Employee computers connected to T3 line Employee computers connected to T3 line Most Web pages.
Pertemuan 10 Enterprise Application Patterns Mata kuliah: T0144 – Advanced Topics in Software Engineering Tahun: 2010.
“How to INDEX and Rank Your Post in Google in Under 60 Seconds!” ~by Brian Cain.
Module 9 User Profiles and Social Networking. Module Overview Configuring User Profiles Implementing SharePoint 2010 Social Networking Features.
Copyright 2007, Information Builders. Slide 1 Machine Sizing and Scalability Mark Nesson, Vashti Ragoonath June 2008.
Scalable Data Scale #2 site on the Internet (time on site) >200 billion monthly page views Over 1 million developers in 180 countries.
Microsoft Partner Conference Integrated Innovation Don Kerr Partner Technology Specialist.
Targeting Audiences Plus: Reliability & Performance Updates.
Title in Sergoe, white, shadow, 36 Presentation title goes here, using Segoe Regular, in sentence case. Integrated Innovation Mark O’Shea Partner Technology.
Fusebox Not Just For Breakfast Anymore! An Introduction to Fusebox Author: Fred T. Sanders, Instant Knowledge Some Content unscrupulously taken from Steve.
© AvePoint 2013 Delve & The Office Graph: A Crash Course Paul Olenick Director, Product Strategy.
WHAT'S THE DIFFERENCE BETWEEN A WEB APPLICATION STREAMING NETWORK AND A CDN? INSTART LOGIC.
Cloud Computing: Pay-per-Use for On-Demand Scalability Developing Cloud Computing Applications with Open Source Technologies Shlomo Swidler.
The Anatomy of a Large-Scale Hypertextual Web Search Engine S. Brin and L. Page, Computer Networks and ISDN Systems, Vol. 30, No. 1-7, pages , April.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
MICROSOFT AJAX CDN (CONTENT DELIVERY NETWORK) Make Your ASP.NET site faster to retrieve.
Social Media : What,When...How ? Service Development Team - May ‘16.
SQL Notification Service와 SMS를 활용한 모바일 솔루션
Presented by Oded Coster
Cleveland SQL Saturday Catch-All or Sometimes Queries
Netscape Application Server
Fast Action Links extension A love letter to CiviCRM
Software Architecture in Practice
New Mexico State University
Distributed Content in the Network: A Backbone View
Making PowerShell Useful
Stack Overflow Behind the Scenes
MIT GSL 2018 week 3 | thursday Meteor and App Ideation.
Genome Workbench Chuong Huynh NIH/NLM/NCBI New Delhi, India
Making PowerShell Useful
Cost to Build a Website with ASP.NET?. Summary Online businesses come with numerous lucrative opportunities in this fast-paced world of internet technology.
Yale Digital Conference 2019
Presentation transcript:

1 Scaling Stack Overflow David Fullerton, VP QCon NYC

2 **SPOILERS**

3 Conclusions 1.Our architecture is boring

4 Conclusions 1.Our architecture is boring 1.How we keep it boring is interesting

5 What’s Stack Overflow?

6 Q&A for Programmers 9.4M questions 16M answers 45M uniques / month 8,000 new questions every day (quantcast.com/stackoverflow.com)

7 Developer Jobs Best place on the internet to get a programming job or hire a developer

8 Part of Stack Exchange Network Stack Overflow-style Q&A in 143 other topics & languages

9 A Distributed Team 34 developers, 6 sysadmins, 6 designers 75% remote

10 A Distributed Team 34 developers, 6 sysadmins, 6 designers 75% remote

11 How do we work? Remote work culture Hire smart people and get out of their way Full-stack developers / sysadmins with a specialty

12 Our Architecture (I warned you, it’s boring)

13 (stackexchange.com/performance)

14 “Monolith Plus” architecture Almost everything happens in the web tier + DB A few services pulled out and optimized

15 Scales pretty well (for us) 4 billion requests per month, 3000 req/s peak 800M SQL queries per day, 8500/s peak

16 (opserver –

17 (opserver –

18 New York (primary) Oregon (secondary) Availability (also boring)

19 Deploys All day every day Rolling deploys through the web tier (TeamCity) Fast!

20 Testing Test on our users Feature flag –Turn it on for a subset of sites to see how it performs

21 * Works for us! Read-heavy load centered on one page Not as much customized content as some sites A forgiving community

22

23 How did we get here?

24 Our Process 1.Start with what we know 2.Measure it live 3.Fix the slow

25 Step 1: Start with what we know Original developers knew C# and MSSQL Started with a bunch of off-the-shelf tools: –ASP.NET MVC –LINQ to SQL –MSSQL + SQL fulltext search –Built-in caching (no Redis)

26 Step 2: Measure it live Performance is a feature! Test under real load Measure, don’t guess

27 (miniprofiler –

28 (miniprofiler –

29 (opserver –

30 (opserver –

31 Step 3: Fix the slow Slow performance is a bug, fix it now! Over time, replace major parts of our stack: –Caching and Redis –SQL access –Tag Engine –Elasticsearch

32 Already hand-rolling queries for performance LINQ to SQL provides basic ORM: Dapper

33 Problem: Dapper

34 Solution: replace the object mapper Idea: emit raw IL, then cache mapper Dapper

35 Results (500 iterations): Dapper (dapper–

36 Tag Engine

37 Tag Engine Early hack: use SQL fulltext search to index tags

38 Tag Engine Problem:

39 Tag Engine Problem: Performance!

40 Tag Engine Highly custom in-memory tag index cache Carefully memory-managed to avoid GC stalls –Learned the hard way: see “Assault by GC” by Marc Gravell Serialize / deserialize from disk on build

41 Results

42 Results 1.Start with what we know 2.Measure it live 3.Fix the slow Optimize for performance, get scale thrown in

43 Results “Monolith Plus” architecture Extract services that solve real problems, not imagined ones Avoid SOA “tax”

44 So my primary guideline would be don’t even consider microservices unless you have a system that’s too complex to manage as a monolith - Martin Fowler, “MicroservicePremium”

45 Conclusions

46 Conclusions 1.Our architecture is boring 2.How we keep it boring is interesting: 1.Start with what we know 2.Measure it live 3.Fix the slow

47 Application You can optimize for performance and get scale thrown in (almost for free) Your monolith can scale further than you think SOA is not the only way –Know your own problem space –Fix actual problems

48 Questions? (We’re all about questions) Obligatory: We’re hiring! stackexchange.com/work-here Open source! stackexchange.github.io Follow me! twitter.com/df07

49

50 Here Be Dragons (rejected slides)

51 Started with basic OutputCache (cache rendered HTML for a page) ~4% cache hit rate Caching

52 Add in-memory & Redis caching Caching

53 StackExchange.Redis Wrote our own library for talking to Redis Multiplexing operations over a single connection Aware of primary / secondary instances –Can target reads at secondary slave

54 StackExchange.Redis (opserver –

55 Moonspeak (Localization)