Wikimedia Architecture Doing More With Less. Asher Feldman <asher@wikimedia.org> Ryan Lane <ryan@wikimedia.org> Wikimedia Foundation Inc.



Similar documents
Wikimedia architecture. Ryan Lane Wikimedia Foundation Inc.

Wikimedia architecture. Mark Bergsma Wikimedia Foundation Inc.

Wikimedia Infrastructure. Roan Kattouw

Designing, Scoping, and Configuring Scalable Drupal Infrastructure. Presented by David Strauss

BASICS OF SCALING: LOAD BALANCERS

Large-Scale Web Applications

ZingMe Practice For Building Scalable PHP Website. By Chau Nguyen Nhat Thanh ZingMe Technical Manager Web Technical - VNG

CS312 Solutions #6. March 13, 2015

WebGUI Load Balancing

Practical Load Balancing

Common Server Setups For Your Web Application - Part II

Drupal Performance Tuning

Distributed Systems 19. Content Delivery Networks (CDN) Paul Krzyzanowski

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

How Comcast Built An Open Source Content Delivery Network National Engineering & Technical Operations

Distributed Systems. 24. Content Delivery Networks (CDN) 2013 Paul Krzyzanowski. Rutgers University. Fall 2013

1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

Building Scalable Web Sites: Tidbits from the sites that made it work. Gabe Rudy

always available Cloud

The importance of Drupal Cache. Luis F. Ribeiro Ci&T Inc. 2013

SCALABLE DATA SERVICES

LARGE SCALE INTERNET SERVICES

From Internet Data Centers to Data Centers in the Cloud

Amazon Web Services Yu Xiao

Measuring the Web: Part I - - Content Delivery Networks. Prof. Anja Feldmann, Ph.D. Dr. Ramin Khalili Georgios Smaragdakis, PhD

How To Understand The Power Of A Content Delivery Network (Cdn)

Are You Ready for the Holiday Rush?

Designing and Implementing Scalable Applications with Memcached and MySQL

(An) Optimal Drupal 7 Module Configuration for Site Performance JOE PRICE

How To Balance A Load Balancer On A Server On A Linux (Or Ipa) (Or Ahem) (For Ahem/Netnet) (On A Linux) (Permanent) (Netnet/Netlan) (Un

Drupal High Availability High Performance

Accelerating Wordpress for Pagerank and Profit

Lecture 8b: Proxy Server Load Balancing

Serving 4 million page requests an hour with Magento Enterprise

Doug Goldberg. Vice President of Magento Solutions, ZeroLag

Distributed Systems. 23. Content Delivery Networks (CDN) Paul Krzyzanowski. Rutgers University. Fall 2015

Open-Xchange Server High availability Daniel Halbe, Holger Achtziger

Distributed Systems. 25. Content Delivery Networks (CDN) 2014 Paul Krzyzanowski. Rutgers University. Fall 2014

SCALABILITY. Hodicska Gergely. Web Engineering Manager as Ustream. May 7, 2012

WINDOWS AZURE DATA MANAGEMENT

Storage Made Easy Enterprise File Share and Sync (EFSS) Cloud Control Gateway Architecture

Tushar Joshi Turtle Networks Ltd

Lecture 3: Scaling by Load Balancing 1. Comments on reviews i. 2. Topic 1: Scalability a. QUESTION: What are problems? i. These papers look at

Layers of Caching: Key to scaling your website. Lance Albertson -- Narayan Newton

DNS ROUND ROBIN HIGH-AVAILABILITY LOAD SHARING

Cloud Based Application Architectures using Smart Computing


Getting Started with AWS. Hosting a Static Website

Building Cloud Applications for the Real World. Aleksey Savateyev Senior Architect

Web Application Hosting Cloud Architecture

Kaltura Video Platform Architecture Overview. Version: February 2013

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

The Devil is in the Details. How to Optimize Magento Hosting to Increase Online Sales

Cache All The Things

Efficient load balancing system in SIP Servers ABSTRACT:

Björn Kraus. Session Aware Full Page Caching For Magento With Varnish ESI

Table of Contents. Overview... 1 Introduction... 2 Common Architectures Technical Challenges with Magento ChinaNetCloud's Experience...

InterWorx Clustering Guide. by InterWorx LLC

Carrier-grade VoIP platform with Kamailio at 1&1

Scaling Pinterest. Yash Nelapati Ascii Artist. Pinterest Engineering. Saturday, August 31, 13

E-commerce is also about

Web Application Deployment in the Cloud Using Amazon Web Services From Infancy to Maturity

Varnish the Drupal way

Internet Content Distribution

TECHNOLOGY WHITE PAPER Jun 2012

Web Caching and CDNs. Aditya Akella

Measuring CDN Performance. Hooman Beheshti, VP Technology

Magento Enterprise Cloud Edition A Platform-as-a-Service for Your Business. Peter Sheldon VP Strategy, Magento Commerce

Creating Value through Innovation MAGENTO 1.X TO MAGENTO 2.0 MIGRATION

The Web as a Client-Server System; TCP/IP intro!

OpenStack Introduction. November 4, 2015

Jive and High-Availability

Introduction to OpenStack Swift CloudOpen Japan 2014

Unibet.com Architecture

DATA COMMUNICATOIN NETWORKING

MySQL és Hadoop mint Big Data platform (SQL + NoSQL = MySQL Cluster?!)

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

Overlay Networks. Slides adopted from Prof. Böszörményi, Distributed Systems, Summer 2004.

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Techniques for Scaling Components of Web Application

Embracing Open Source: Practice and Experience from Alibaba. Wensong Zhang The 11 th Northeast Asia OSS Promotion Forum

The Value of Content Distribution Networks Mike Axelrod, Google Google Public

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

Introduction. Examples of use cases:

Creating Web Farms with Linux (Linux High Availability and Scalability)

CS514: Intermediate Course in Computer Systems

Web Application Firewalls: When Are They Useful? OWASP AppSec Europe May The OWASP Foundation

Jive and High-Availability

MySQL and Virtualization Guide

Transcription:

Wikimedia Architecture Doing More With Less Asher Feldman <asher@wikimedia.org> Ryan Lane <ryan@wikimedia.org> Wikimedia Foundation Inc.

Overview Intro Scale at WMF How We Work Architecture Dive

Top Five Worldwide Sites (Q411) Company Users Revenue Employees Server count 1+ billion $37.9B 32,000+ 1,000,000+ 905 million $69B 93,000 50,000+ 714 million $3.8B 3,000+ 60,000+ 689 million $6B 1,200 50,000+ 490 million $30m 75 700

What We're Working With > 490 Million unique visitors per month 1.6 Billion Article Views per day 10 Billion HTTP Requests Served per day Mostly served by around 130 Apache/PHP/memcached, 50 MySQL, 100 Squid/Varnish, 24 Lucene, and 20 swift + image processing servers

Open Source, Open Culture Around 25 Full Time Software and Operations Engineers, but a global community of Open Source developers helping to develop and extend MediaWiki Even Operations follows the model our puppet cluster confguration code is public, as are our monitoring services. Volunteers can model changes in our virtualized Labs cluster Everything we use is Open Source. We often modify apps (such as squid) to meet our needs and scale, but we always release the changes

Basic Architecture Users GeoDNS Swift Image Scalers Parser Cache Media Varnish LVS (DR) Bits Varnish (js, css, etc) LVS (DR) Text Squid App Servers Apache PHP MediaWiki Core MySQL API Servers API Squid Apache PHP MediaWiki ResourceLoader Apache PHP Mobile Varnish Memcached Lucene Revision MySQL

The Wiki software All Wikimedia projects run on a MediaWiki platform Designed primarily for Wikimedia sites Very scalable (mostly), very good localization Open Source PHP software (GPL)

MediaWiki optimization We try to optimize by... not doing anything stupid (this is hard!) caching expensive operations focusing on the hot spots in the code (profling!) If a MediaWiki feature is too expensive, it doesn t get enabled on Wikipedia

MediaWiki caching Objects + queries cached in memcached Article html (parsed wikitext) stored in Parser Cache combined memcached + MySQL blob storage, to scale far beyond available ram

MediaWiki profling http://gdash.wikimedia.org/ (and others) Wikimedia architecture

Core databases Mysql 5.1 with the Facebook patch set Separate big, popular wikis from smaller wikis (shard by wiki, but we need to do better to keep scaling) Profle with mk-query-digest and the percona-toolkit One master per shard, many replicated slaves Reads are load balanced amongst unlagged slaves, writes to master

Database profling

Squid caching Caching reverse HTTP proxy Uses CARP to consistently route requests to backend caches Hit rate is > 85% Serves our article and api traffc, other clusters have moved to Varnish

CARP Wikimedia architecture

Varnish Caching Used for delivering static content such as js and css fles (bits), media (uploads), and our mobile site 2-3 times more effcient than Squid Will eventually replace squid entirely in our infrastructure, but some development is still needed We've served >40k requests/second from a single server URI hashing between tiered caches replaces CARP (we are adding consistent hashing to Varnish)

Cache invalidation Wiki pages are edited at an unpredictable rate Users should always see current revision Invalidation through expiry times not acceptable Purge implemented using multicast UDP based HTCP protocol

Media storage Images inline in articles (thumbnails) are stored in Swift, recently replacing an unscalable NFS based solution Part of OpenStack, Swift is like an Open Source implementation of S3 (even supports the S3 API) Soon originals and video will be stored in and served from swift as well

Content Distribution Network (CDN) 3 clusters on 2 different continents: Redundant application and cache clusters in Tampa, Florida and Ashburn,Virginia. Currently Tampa is our primary application cluster but cached traffc is served from Ashburn Europe served by a caching-only cluster in Amsterdam (uncached content is proxied to Tampa) Soon building a new caching cluster in California which will lower latency to Asia

Geographic Load Balancing Most users use DNS resolver close to them Using PowerDNS with a Geobackend Map IP address of resolver to a country code Deliver CNAME of close datacenter entry based on country

Load Balancing: LVS-DR Linux Virtual Server The load balancer divides incoming traffc over the real servers Return traffc goes directly! Direct Routing mode All real servers share the same IP address Wikimedia architecture

Closing notes We rely heavily on open source Still some big scaling issues to tackle around parsing and editing Always looking for effciencies Looking for more effcient management tools Looking for more contributors

Questions, comments? E-mail: Asher Feldman <afeldman@wikimedia.org>