Wikimedia architecture. Ryan Lane <ryan@wikimedia.org> Wikimedia Foundation Inc.



Similar documents
Wikimedia Architecture Doing More With Less. Asher Feldman Ryan Lane Wikimedia Foundation Inc.

Wikimedia architecture. Mark Bergsma Wikimedia Foundation Inc.

Wikimedia Infrastructure. Roan Kattouw

Common Server Setups For Your Web Application - Part II

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

BASICS OF SCALING: LOAD BALANCERS

5 Mistakes to Avoid on Your Drupal Website

High Availability Solutions for the MariaDB and MySQL Database

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

WEB SITE SECURITY. Jeff Aliber Verizon Digital Media Services

CS312 Solutions #6. March 13, 2015

How To Understand And Understand The Security Of A Web Browser (For Web Users)

Are You Ready for the Holiday Rush?

Multifaceted Approach to Understanding the Botnet Phenomenon

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

The old Internet. Software in the Network: Outline. Traditional Design. 1) Basic Caching. The Arrival of Software (in the network)

Large-Scale Web Applications

Adding scalability to legacy PHP web applications. Overview. Mario Valdez-Ramirez

Learn Ethical Hacking, Become a Pentester

Appendix to; Assessing Systemic Risk to Cloud Computing Technology as Complex Interconnected Systems of Systems

Comparison of the Frontier Distributed Database Caching System with NoSQL Databases

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

Getting Started with AWS. Hosting a Static Website

DNS ROUND ROBIN HIGH-AVAILABILITY LOAD SHARING

Web-Application Security

Oracle Application Express MS Access on Steroids

always available Cloud

WHY RECOMMEND SITEGROUND WORDPRESS HOSTING?

Disaster Recovery White Paper

Lecture 8b: Proxy Server Load Balancing

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

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

Intro to Load-Balancing Tomcat with httpd and mod_jk

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

Accelerating Wordpress for Pagerank and Profit

ExamPDF. Higher Quality,Better service!

Apache Traffic Server Extensible Host Resolution

Server Architecture for High- Performance Drupal

An Open Source NoSQL solution for Internet Access Logs Analysis

Serving 4 million page requests an hour with Magento Enterprise

Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

FileRunner Security Overview. An overview of the security protocols associated with the FileRunner file delivery application

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

Drupal Performance Tuning

FAQs for Oracle iplanet Proxy Server 4.0

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

Lecture 2 CS An example of a middleware service: DNS Domain Name System

Cloud Computing. With MySQL and Pentaho Data Integration. Matt Casters Chief Data Integration at Pentaho Kettle project founder

E-commerce is also about

Assignment # 1 (Cloud Computing Security)

SiteCelerate white paper

Big data blue print for cloud architecture

Techniques for Scaling Components of Web Application

Learning Management Redefined. Acadox Infrastructure & Architecture

Framework as a master tool in modern web development

Web DNS Peer-to-peer systems (file sharing, CDNs, cycle sharing)

Hack Yourself First. Troy troyhunt.com

CS 558 Internet Systems and Technologies

Alan Clark. OpenStack. The Foundation for Open Source Cloud

Indirection. science can be solved by adding another level of indirection" -- Butler Lampson. "Every problem in computer

Hardened Plone. Making Your Plone Site Even More Secure. Presented by: Nathan Van Gheem

Reducing Application Vulnerabilities by Security Engineering

PowerDNS Introduction

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

Magento & Zend Benchmarks Version 1.2, 1.3 (with & without Flat Catalogs)

API documentation - 1 -

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

Incapsula vs. CloudFlare

In Memory Accelerator for MongoDB

Dynamic Load Balancing and Node Migration in a Continuous Media Network

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

WINDOWS AZURE DATA MANAGEMENT

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

Intrusion detection for web applications

Hacking Web Apps. Detecting and Preventing Web Application Security Problems. Jorge Blanco Alcover. Mike Shema. Technical Editor SYNGRESS

Hadoop IST 734 SS CHUNG

Security Research Advisory IBM inotes 9 Active Content Filtering Bypass

Arrow ECS University 2015 Radware Hybrid Cloud WAF Service. 9 Ottobre 2015

Netsweeper Whitepaper

Scaling DBMail with MySQL

Getting Started with AWS. Hosting a Static Website

ensuring security the way how we do it

OVERVIEW OF TYPICAL WINDOWS SERVER ROLES

opensuse.org Build Service

LARGE SCALE INTERNET SERVICES

Magento Security and Vulnerabilities. Roman Stepanov

Attack Vector Detail Report Atlassian

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP Edge Gateway for Layered Security and Acceleration Services

Content Delivery Networks (CDN) Dr. Yingwu Zhu

Transcription:

Wikimedia architecture Ryan Lane <ryan@wikimedia.org> Wikimedia Foundation Inc.

Intro Our technical operations Global architecture Application servers Storage Caching Load balancing Content Delivery Network (CDN) The site architecture you can edit Community involvement Topics

Top fve worldwide sites Company Users Revenue Employees Server count 920 million $23 billion 20,600 1,000,000+ 740 million $58 billion 93,000 50,000+ 600 million 13,900 50,000+ 500 million $300 million 1,200 30,000+ 400 million $20 million 50 350 $6 billion

Our operations Currently managed by ~6 ops engineers Historically ad-hoc, fre fghting mode Technical staff spread out globally Always someone awake...but no on-call Working to engage community operations contributors

Operations communication Most communication public on IRC Documentation in a wiki (http://wikitech.wikimedia.org) Sensitive communication via private lists and resource trackers

Architecture: LAMP...

...on steroids.

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

MediaWiki optimization We optimize by... caching expensive operations focusing on the hot spots in the code (profling!) If a MediaWiki feature is too expensive, it doesn't get enabled

MediaWiki caching Caches everywhere Most of this data is cached in Memcached, a distributed object cache

MediaWiki profling http://noc.wikimedia.org/cgi-bin/report.py

Core databases One master, many replicated slaves Separate database per wiki Load balanced reads to slaves, write operations to master Separate big, popular wikis from smaller wikis (sharding)

Media storage Current solution is not scalable Replacing with an open source distributed fle system Likely OpenStack Swift

Thumbnail generation stat() on each request is too expensive, so assume every fle exists If a thumbnail doesn t exist, ask the application servers to render it

Squid caching Caching reverse HTTP proxy Serves most of our traffc Split into two groups Hit rates: 95% for Text, 98% for Media, since the use of CARP

CARP

Squid 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

Varnish Caching 2-3 times more effcient than Squid Will eventually replace the Squid architecture Currently used for delivering static content such as javascript and css fles (bits)

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

Content Distribution Network (CDN) 2 clusters on 2 different continents: Primary cluster in Tampa, Florida Secondary caching-only cluster in Amsterdam Adding a new primary datacenter in Virginia

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

The Site Architecture You Can Edit Membase? Swift Mobile? Varnish

Test/Dev Architecture

Basic use case Ops makes initial default project Clone of production cluster Used for most test/dev New projects mirror community or foundation initiatives Devs build architecture in new project Project moved to production cluster Devs request merge for puppet changes via gerrit Project instances moved to default project and tested

How to engage the community Discuss Commit Participate

How to engage the community Document Communicate changes

Our philosophy Engage early Release early, release often Scratch your own itch

Coding for WMF: Security Security is important. Really. People rely on developers to write secure code, so: An insecure extension in SVN... An insecure extension on Wikipedia...

Common vulnerabilities to avoid SQL injection Cross site scripting (XSS) Cross site request forgery (CSRF) Register Globals

General notes on security Don't trust anyone Sanitize all input Write code that is demonstrably secure Best of all: try to break and hack your own code

Coding for WMF: Scalability and performance Wikimedia sites are huge th 5 most visited web presence Code must be: Performant Scalable

Coding for WMF: Scalability and performance Cache Profle Optimize Ask for advice!

Coding for WMF: Concurrency Assume a clustered architecture, always Your code will run concurrently It can result in strange bugs

Closing notes We rely heavily on open source Always looking for effciencies Looking for more effcient management tools Looking for more contributors

Questions, comments? E-mail: Ryan Lane <ryan@wikimedia.org> IRC: Freenode, Nick: Ryan_Lane, Channels: #wikimediatech, #wikimedia-operations, #mediawiki, #openstack

Communication resources Mailing lists http://www.mediawiki.org/wiki/mailing_lists Important lists: mediawiki-l: A MediaWiki support list wikitech-l: A MediaWiki developer's list mediawiki-api: A MediaWIki developer's list for the API IRC channels (on freenode) #mediawiki: A MediaWiki support channel

Developer resources http://www.mediawiki.org/wiki/developer_hub/ja - developer hub Developer hub: lists resources, guidelines, and code documentation http://www.mediawiki.org/wiki/how_to_become_a_mediawiki_hacker/ja How to become a MediaWiki hacker: introduction into how to do MediaWiki development http://www.mediawiki.org/wiki/security_for_developers Security for developers: essential security documentation

Developer resources http://www.mediawiki.org/wiki/manual:coding_conventions/ja http://www.mediawiki.org/wiki/localisation/ja Coding conventions: conventions required for all Wikimedia run software Localisation: resources to write code that can be easily localised http://www.mediawiki.org/wiki/code_review_guide Code review guide: how your code will be reviewed before inclusion