Backend High Availability. Maxime Fouilleul Data Architect

Similar documents
AREA TOTALS OECD Composite Leading Indicators. OECD Total. OECD + Major 6 Non Member Countries. Major Five Asia. Major Seven.

THE WORLD COMPETITIVENESS SCOREBOARD 2011

2014/15 UEFA European Under-17 and Under-19 Championships Elite round draws. 3 December 2014, Nyon, Switzerland

Max Sort Sortation Option - Letters

German Machine Tool Industry - Key Figures

U16 European Championship Men 2012, Division A 19 th 29 th July 2012 in Lithuania & Latvia GAME SCHEDULE

2016/17 UEFA European Under-17 and Under-19 Championships Qualifying round draws. 3 December 2015, Nyon, Switzerland

13 December 2016, Nyon, Switzerland. 2016/17 UEFA European Under-17 and Under-19 Championships. Elite round draws

Selection statistics

24 November 2017, Nyon, Switzerland. 2017/18 UEFA European Women s Under-17 and Women s Under-19 Championships. Elite round draws

2015/16 UEFA European Women s Under-17 and Women s Under-19 Championships Elite round draws

UEFA Nations League 2018/19 League Phase Draw Procedure

The Euro 2016 Competition In support of

Commemorative Books Coverage List

RUGBY EUROPE COMPETITIONS CALENDAR 2017 / 2018

2016/17 UEFA European Women s Under 17 and Women s Under 19 Championships Qualifying draws

11 November 2016, Nyon, Switzerland. 2016/17 UEFA European Women s Under-17 and Women s Under-19 Championships. Elite round draws

RUGBY EUROPE COMPETITIONS CALENDAR 2017 / 2018

RUGBY EUROPE COMPETITIONS CALENDAR 2017 / 2018

Global Construction Outlook: Laura Hanlon Product Manager, Global Construction Outlook May 21, 2009

NEW COMMERCIAL VEHICLE REGISTRATIONS EUROPEAN UNION 1. July and August 2017

European Values Study & World Values Study - Participating Countries ( )

Selection statistics

Peter Ch. Löschl, ABA Invest in Austria June Austria Investment Climate Reasons to Invest in Austria - Perspectives

23 November 2018, Nyon, Switzerland. 2019/20 UEFA European Women s Under-17 and Women s Under-19 Championships. Qualifying round draws

New rules, new opportunities: a potential for growth

ESSA 2018 ANNUAL INTEGRITY REPORT

Upgrading Bio-Plex Manager 4.1, 5.0, or 6.0 Software to Bio-Plex Manager 6.1 Software

Table 34 Production of heat by type Terajoules

FACT Sheet. FIFA World Cup : seeded teams South Africa Germany Korea/Japan 2002

Introductions, Middle East, Israel, Jordan, Yemen, Oman Week 1: Aug Sept. 1

Hauptreisegründe nach Markt.

Architecture - the Market

Fibre to the Home: Taking your life to new horizons!

January Deadline Analysis: Domicile

Stockholm s tourism industry. November 2016

Total points. Nation Men kayak Women kayak Men canoe Women canoe Total 600 BELARUS KAZAKHSTAN 54. Page 1 of 4. powered by memórias

Stockholm s tourism industry. December 2016

PRESENTED BY HOP GROWERS OF AMERICA

Medal Standing. ECH Seville, Spain 31 May - 2 June As of 2 JUN INTERNET Service: Men.

Small Arms Survey 2015 Annexe 4.4 Authorized transfers of small arms and light weapons to Egypt, Libya, and Syria,

KINGDOM OF CAMBODIA NATION RELIGION KING 3

The globalisation of sporting events: Myth or reality?

Desalination From theory to practice People, Papers, Publications. Miriam Balaban EDS Secretary General

CURRENT DEMOGRAPHIC SITUATION IN LATVIA

OECD employment rate increases to 68.4% in the third quarter of 2018

Table I. NET CALORIFIC VALUES OF ENERGY PRODUCTS GJ/ton

FTTH Council Europe Panorama & Forecast Market at September 2018 & Forecast by 2020 & 2025

June Deadline Analysis: Domicile

Swedish and European Opinions on Energy Production

Confidence through experience. Track record as of 30 June 2012

Country fact sheet South Korea

TV MEDIA ANALYSIS END SEASON Expertise by Nielsen Sports Your contact person(s): Marco Nazzari, Pamela Delmiglio

2018 Hearthstone Wild Open. Official Competition Rules

I. World trade in Overview

Common Market Organisation (CMO) Fruit and vegetables sector Evolution of EU prices of certain F&V

UEFA EURO 2020 Qualifying Draw Procedure

The 11th Korea Prime Minister Cup International Amateur Baduk Championship

Global Economic Indicators: Global Leading Indicators

UEFA Futsal EURO Preliminary & Main Round Draw Procedure

Wednesday 13 June 2012 Afternoon

STATISTICS

Student Nationality Mix for BAT Bath

Israel Innovation Authority

2 nd Road Safety PIN Conference 23 June 2008 Countdown to only two more years to act!

USTA Player Development 2017 Excellence Grant Criteria Jr Girls, Collegiate & Professional Players

Freshwater fish. Carp, Perch, Pike, Burbot, Barb, Milkfish. Extract from GLOBEFISH Databank Prices - Exports - Imports - Production

NAVI UPDATES

CMMI Maturity Profile Report. 30 June 2017

Architect: Dekleva Gregoric Architects Project: Compact Karst House Photo: James Maroti Place: Vrhovlje, Slovenia

Road Safety Pledge. Route to vision zero 2050 in Europe The Hague, June 14th, Malta. Luxembourg Lithuania Latvia Italy

EUROPEAN RIDERS, HORSES AND SHOWS AT THE FEI 2012

IBSA Goalball World Rankings 31 December 2017 Men's Division

STORM FORECASTS: The only independent source of animal health and animal agriculture historical market data and forecasts

DEVELOPMENT AID AT A GLANCE

Selection statistics

Welcome to KNX Scientific Conference 2012 Las Palmas Gran Canaria Watch how international KNX has become!

2016 River Use Statistics -by Steve Sullivan

Swedish Opinion on Nuclear Power

FIL Qualifying Event Proposal. Problem Statement. Proposal for voting at GA

España, Portugal + Important roads of Europe 2012 FX

Table I. NET CALORIFIC VALUES OF ENERGY PRODUCTS GJ/ton

Production, trade and supply of natural gas Terajoules

Beer statistics edition. The Brewers of Europe

EH LIVESTOCK TRANSPORT PAST - PRESENT - FUTURE

Swedish Opinion on Nuclear Power

Fact sheet on elections and membership

Update of trade weights data underlying the EERs and HCIs

European Research Council

Dual Careers: Which support to athletes is necessary to excel in sport and education The IOC Athlete Career Programme

Invitation to. The 36th World Amateur Go Championship in Bangkok. Outline

CISM Friendship through Sport

languagecaster.com learning English through football

Beer statistics edition. The Brewers of Europe

TERMINAL BLOCK SUMMARY

Post Show Report April 2015, Moscow, Russia. #ipheb

Summary Charts Scenario 3 - Low Change Scenario

LEAGUE PHASE DRAW PRESS KIT

Country fact sheet Germany

Happiness trends in 24 countries,

Transcription:

Backend High Availability Maxime Fouilleul Data Architect dude@blablacar.com

Agenda BlaBlaCar Facts & Figures Infrastructure Ecosystem 100% rkt powered carpooling Backend High Availability Pillars MySQL as example

Facts and figures 40 million members 21 million mobile app downloaded (iphone + Android) 12 million travelers per quarter Founded in 2006 CO2 1 million tonnes less CO2 in the past year Currently in 22 countries France, Spain, UK, Italy, Poland, Hungary, Croatia, Serbia, Romania, Germany, Belgium, India, Mexico, The Netherlands, Luxembourg, Portugal, Ukraine, Czech Republic, Slovakia, Russia, Brazil and Turkey.

Our prod data ecosystem MySQL Cassandra Redis ElasticSearch PostgreSQL Couchbase Transactional 16 clusters 28 nodes Distributed 6 clusters 31 nodes Volatile 15 clusters 45 nodes Search 6 clusters 42 nodes Spatial 2 cluster 8 nodes Sessions 4 clusters 18 nodes

Infrastructure Ecosystem 100% rkt powered carpooling

Our infrastructure ecosystem front_1 nerve nerve php mysql-main_1 Service Discovery Service Codebase create nginx nerve synapse zookeeper dgr build monitoring mysqld Container Registry store synapse monitoring ggn run rkt PODs Distributed init system fleet etcd fleet machines Hardware CoreOS host bare-metal servers 1 type of hardware 3 disk profiles

Service Discovery Zookeeper go-synapse go-nerve /database/node1 /database go-synapse watches zookeeper service keys and reloads haproxy if changes are detected go-nerve does health checks and reports to zookeeper in service keys HAProxy Applications hit their local haproxy to access backends node1

Backend High Availability Pillars MySQL as example

Abolish Slavery Every node is the same

MySQL at BlaBlacar Historical/main database We use sync and async replication Sync replication is ensured by MariaDB Galera Galera = no master + no rep lag Master wsrep wsrep wsrep wsrep wsrep Slave Slave Slave Galera

Nerve - Track and report service status # cat env/prod-dc1/services/mysql-main/attributes/nerve.yml --- override: nerve: services: - name: main-read" port: 3306 reporters: - {type: zookeeper, path: /services/mysql/main_read} checks: - type: sql driver: mysql datasource: "local_monitor:local_monitor@tcp(127.0.0.1:3306)/" enablecheckstablecommand: ["/root/report_slow_queries.sh"] disablegracefullydonecommand: ["/root/report_remaining_processes.sh"] - name: "main-write" port: 3306 reporters: - {type: zookeeper, path: /services/mysql/main_write} checks: - type: sql driver: mysql datasource: "local_monitor:local_monitor@tcp(127.0.0.1:3306)/" haproxyserveroptions: "backup" # zookeepercli -c lsr /services/mysql/main_read mysql-main_read1_192.168.1.2_ba0f1f8b3 mysql-main_read2_192.168.1.3_734d63da mysql-main_read3_192.168.1.4_dde45787 # zookeepercli -c get /services/mysql/mysql-main_read1_192.168.1.2_ba0f1f8b3 { "available":true, "host":"192.168.1.2", "port":3306, "name":"mysql-main1", "weight":255, "labels":{ "host":"r10-srv4" } } # zookeepercli -c get /services/mysql/mysql-main_write1_192.168.1.2_ba0f1f8b3 { "available":true, "host":"192.168.1.2", "port":3306, "name":"mysql-main1", "haproxy_server_options":"backup", "weight":255, "labels":{ "host":"r10-srv4" } }

Synapse - Service discovery router # cat env/prod-dc1/services/tripsearch/attributes/synapse.yml --- override: synapse: services: - name: mysql-main_read path: /services/mysql/main_read port: 3307 servercorrelation: type: excludeserver otherservicename: mysql-main_write scope: first - name: mysql-main_write path: /services/mysql/main_write port: 3308 serversort: date # cat env/prod-dc1/services/tripsearch/attributes/tripsearch.yml --- override: tripsearch: database: read: host: localhost database: tripsearch user: tripsearch_rd port: 3307 write: host: localhost database: tripsearch user: tripsearch_wr port: 3308

Synapse - haproxy What is looks like in the local haproxy

Be Quiet! Come gently into prod

Manage the load on newcomers # cat env/prod-dc1/services/mysql-main/attributes/nerve.yml --- override: nerve: services: - name: main-read" port: 3306 reporters: - {type: zookeeper, path: /services/mysql/main_read} checks: - type: sql driver: mysql datasource: "local_monitor:local_monitor@tcp(127.0.0.1:3306)/" enablecheckstablecommand: ["/root/report_slow_queries.sh"]

Manage the load on newcomers # bbc mysql prod-dc1 mysql-main overview === Service Overview 'prod-dc1 mysql-main' === mysql-main1 (192.168.1.2) PING, PORT, Synced --- mysql-main1_read (3306) - enabled - weight = 255/255 mysql-main1_write (3306) - enabled - weight = 255/255 mysql-main2 (192.168.1.3) PING, PORT, Synced --- mysql-main2_read (3306) - enabled - weight = 255/255 mysql-main2_write (3306) - enabled - weight = 255/255 mysql-main3 (192.168.1.4) PING, PORT, Synced --- mysql-main3_read (3306) - enabled - weight = 255/255 mysql-main3_write (3306) - enabled - weight = 255/255 # bbc mysql prod-dc1 mysql-main mysql-main1 monitor Weight: 0/255 Processes: 0 Slow: 0 Weight: 2/255 Processes: 0 Slow: 0 Weight: 3/255 Processes: 3 Slow: 0 Weight: 4/255 Processes: 7 Slow: 0 Weight: 6/255 Processes: 10 Slow: 0 Weight: 9/255 Processes: 12 Slow: 0 Weight: 15/255 Processes: 20 Slow: 1 Weight: 0/255 Processes: 20 Slow: 1 Weight: 2/255 Processes: 12 Slow: 0 Weight: 3/255 Processes: 4 Slow: 0 Weight: 4/255 Processes: 7 Slow: 0 Weight: 6/255 Processes: 10 Slow: 0 Weight: 9/255 Processes: 12 Slow: 0 Weight: 15/255 Processes: 20 Slow: 0 Weight: 23/255 Processes: 35 Slow: 0 Weight: 38/255 Processes: 40 Slow: 0 Weight: 38/255 Processes: 35 Slow: 0 Weight: 61/255 Processes: 36 Slow: 0 Weight: 61/255 Processes: 47 Slow: 0 Weight: 98/255 Processes: 44 Slow: 0 Weight: 98/255 Processes: 41 Slow: 0 Weight: 158/255 Processes: 38 Slow: 0 Weight: 158/255 Processes: 50 Slow: 0 Weight: 255/255 Processes: 46 Slow: 0 Weight: 255/255 Processes: 46 Slow: 0

Die in Peace... Get out when you are ready

Gracefull shutdown # cat env/prod-dc1/services/mysql-main/attributes/nerve.yml --- override: nerve: services: - name: main-read" port: 3306 reporters: - {type: zookeeper, path: /services/mysql/main_read} checks: - type: sql driver: mysql datasource: "local_monitor:local_monitor@tcp(127.0.0.1:3306)/" enablecheckstablecommand: ["/root/report_slow_queries.sh"] disablegracefullydonecommand: ["/root/report_remaining_processes.sh"]

Backend High Availability Pillars Abolish Slavery Every node is the same 1 type of Hardware rkt Containers No master/slave Service Discovery (nerve/synapse) Be Quiet! Come gently into prod Graceful restart Service Discovery (nerve/synapse) Weight system Slow query tracking Die in Peace... Get out when you are ready Graceful restart Service Discovery (nerve/synapse) Weight system

Thanks! blablatech.com github.com/blablacar