SlideShare a Scribd company logo
1 of 30
Download to read offline
Who’s me?
Zequi V´azquez
DevOps & Backend
PhD student
Hacking & Security
Rock’n’Roll (electric guitarist)
Videogames
Books
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
1 Introduction
2 The Project
3 Problems and Solutions
4 Demo
5 Conclusions
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
1 Introduction
2 The Project
3 Problems and Solutions
4 Demo
5 Conclusions
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Drupal performance, scalabilty & availability
Memcache
Apc / Opcache
Varnish
Redundancy
Choose your cache improvement module
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Cloud computing and containers
Elastic computing → resources grow on demand
In theory, we achieve full scalability and availability. False!
The hidden enemy: budget grows till infinity and beyond
Containers (Docker) → Only for local environments?
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
1 Introduction
2 The Project
3 Problems and Solutions
4 Demo
5 Conclusions
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Some base requirements
Built in Drupal 7, as a multisite install
At first, +30k sites. It needs to scale up to +100k sites
Availability close to 99.999 %
Of course, high performance at lowest possible cost
Need to control site creation from external app
Automated and not-disruptive deployments
Ability to execute drush commands on all sites
Migration from previous platform
Three devs only - frontend, backend and devops
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Seems scary, uh?
Usual techs are not enough to tackle project
We are “computer scientists”, aren’t we?
God bless Open Source
Stairway to heaven cloud
Docker is more than local
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Drupal over Nginx and PHP-fpm
Nginx allow a real very flexible configuration
PHP fpm increases performance significantly
Mod Security with custom rules for Drupal
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Manage sites on a multisite Drupal
Node.JS is asynchronous: execute something, and forget about it
Use DynamoDB to store a list of deployed sites
API to allow batch operations on sites list
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Stateless Drupal container
Memcache, MySQL, MongoDB as external services
S3fs module → all files on S3
Emails sent through PostMark
Monitorization using NewRelic
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
The Cluster: Apache Mesos and Marathon
Mesos abstracts the resources and creates a cluster
Two masters orchestrated by Zookeeper, one or more workers
Marathon allows to run Docker containers
Chronos allows to run cron jobs
Rest API to manage apps and containers
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Mesos over AWS
EC2 image for autoscaling from Mesos main worker
AMI contains all 3 Docker images
Script to sync amount of Marathon apps with workers number
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Deployments: And automatization for all . . .
Lazy DevOps is best DevOps
Ansible let us manage AWS in a simple (and powerful!) way
Makefile + Dockerfile = Over 9000!
Create and destroy environments with a single command
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Devil is on details
AWS do backups, but it’s worth to create your own recovery plan
Security groups for EC2 → inbound and outbound firewall
Remember to use protection → Http Auth for all Rest APIs
Log centralization is a must → All hail Mesos!
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
1 Introduction
2 The Project
3 Problems and Solutions
4 Demo
5 Conclusions
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Database(s): So you think 30k sites are too much
30k sites on a Drupal multisite means 30k databases
MySQL → 1 folder per database, 1 file per table
MongoDB preallocates files when a database is created
Conclusion? Unmanageable
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Divide and conquer!
Identify each site using a unique hash
Use that hash as prefix for tables on MySQL and MongoDB
Group 500 sites per database, both MongoDB and MySQL
MongoDB maximum database size is 3.952GB
MySQL number of tables per database is 62k aprox.
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
The Way of the Request
Ever seen a settings.php with steroids?
Connect to DynamoDB
Identify domain from the request
(both drush and http)
Calculate domain unique hash
Ask DynamoDB for the database
where the site lives
Make sure hash is used as prefix
Store database reference on Memcache
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
In soviet Russia, Nginx configures you
Strange timeout when creating a new site from NodeJS app
Happened when Node.JS app launched a site creation
Fire and forget. When site was created, app is notified
Further investigation → timeout produced on Haproxy
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Another brick(s) in the wall
Unstability on autoscaling group
MongoDB MMS instances out of space
PHP-fpm unstability → slowlog
Thousand S3 buckets? God bless S3fs
Remote & massive Drush
Migration: 30k sites on few days
AWS RDS speed: the bigger, the better
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
1 Introduction
2 The Project
3 Problems and Solutions
4 Demo
5 Conclusions
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Demo time!
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
1 Introduction
2 The Project
3 Problems and Solutions
4 Demo
5 Conclusions
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Conclusions: Spoiler alert!
Project went live on April 2015. Absolute success!
Learned a lot about new technologies
Cloud + Containers = Profit
Drupal flexibility is amazing
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
Thank you!
What did you think? Please, evaluate this session
@RabbitLair
ezequielvazq[at]gmail[dot]com
Zequi V´azquez @RabbitLair Drupal #ExtremeScaling

More Related Content

What's hot

The Data Mullet: From all SQL to No SQL back to Some SQL
The Data Mullet: From all SQL to No SQL back to Some SQLThe Data Mullet: From all SQL to No SQL back to Some SQL
The Data Mullet: From all SQL to No SQL back to Some SQL
Datadog
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
takezoe
 
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Claus Ibsen
 

What's hot (20)

Microservices: 5 things I wish I'd known - Vincent Kok - Codemotion Amsterdam...
Microservices: 5 things I wish I'd known - Vincent Kok - Codemotion Amsterdam...Microservices: 5 things I wish I'd known - Vincent Kok - Codemotion Amsterdam...
Microservices: 5 things I wish I'd known - Vincent Kok - Codemotion Amsterdam...
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
 
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
 
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
ITB2019  Serverless CFML on AWS Lambda - Pete FreitagITB2019  Serverless CFML on AWS Lambda - Pete Freitag
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
 
Microsoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformMicrosoft Azure IaaS and Terraform
Microsoft Azure IaaS and Terraform
 
Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!Azure Functions - Get rid of your servers, use functions!
Azure Functions - Get rid of your servers, use functions!
 
Migrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to AzureMigrating Existing Open Source Machine Learning to Azure
Migrating Existing Open Source Machine Learning to Azure
 
Fact-Based Monitoring - PuppetConf 2014
Fact-Based Monitoring - PuppetConf 2014Fact-Based Monitoring - PuppetConf 2014
Fact-Based Monitoring - PuppetConf 2014
 
The Data Mullet: From all SQL to No SQL back to Some SQL
The Data Mullet: From all SQL to No SQL back to Some SQLThe Data Mullet: From all SQL to No SQL back to Some SQL
The Data Mullet: From all SQL to No SQL back to Some SQL
 
R in Minecraft
R in Minecraft R in Minecraft
R in Minecraft
 
How Spotify scales Apache Storm Pipelines
How Spotify scales Apache Storm PipelinesHow Spotify scales Apache Storm Pipelines
How Spotify scales Apache Storm Pipelines
 
1 Million Writes per second on 60 nodes with Cassandra and EBS
1 Million Writes per second on 60 nodes with Cassandra and EBS1 Million Writes per second on 60 nodes with Cassandra and EBS
1 Million Writes per second on 60 nodes with Cassandra and EBS
 
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
 
Node Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsNode Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functions
 
Deep Learning을 위한 AWS 기반 인공 지능(AI) 서비스 (윤석찬)
Deep Learning을 위한  AWS 기반 인공 지능(AI) 서비스 (윤석찬)Deep Learning을 위한  AWS 기반 인공 지능(AI) 서비스 (윤석찬)
Deep Learning을 위한 AWS 기반 인공 지능(AI) 서비스 (윤석찬)
 
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
 
Reuse, Reduce, Recycle in Serverless World
Reuse, Reduce, Recycle in Serverless WorldReuse, Reduce, Recycle in Serverless World
Reuse, Reduce, Recycle in Serverless World
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
 
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by step
 

Viewers also liked

STUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLY
STUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLYSTUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLY
STUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLY
Journal For Research
 

Viewers also liked (19)

Drupal Hosting on Ægir and Nginx
Drupal Hosting on Ægir and NginxDrupal Hosting on Ægir and Nginx
Drupal Hosting on Ægir and Nginx
 
Ammonium Carbonate - Hazardous Substance Fact Sheet
Ammonium Carbonate - Hazardous Substance Fact Sheet Ammonium Carbonate - Hazardous Substance Fact Sheet
Ammonium Carbonate - Hazardous Substance Fact Sheet
 
Carnaval 2017
Carnaval 2017Carnaval 2017
Carnaval 2017
 
मुलांची वर्तणूक व समस्या
मुलांची वर्तणूक व समस्यामुलांची वर्तणूक व समस्या
मुलांची वर्तणूक व समस्या
 
Health & Harmony
Health & HarmonyHealth & Harmony
Health & Harmony
 
OIV ramos, et al, 2011
OIV ramos, et al, 2011OIV ramos, et al, 2011
OIV ramos, et al, 2011
 
Ammonium carb
Ammonium carbAmmonium carb
Ammonium carb
 
Porta de giro com corpo em veneziana e bandeira
Porta de giro com corpo em veneziana e bandeiraPorta de giro com corpo em veneziana e bandeira
Porta de giro com corpo em veneziana e bandeira
 
Análise de Percepção do Museu da Montanha e da Girafa
Análise de Percepção do Museu da Montanha e da GirafaAnálise de Percepção do Museu da Montanha e da Girafa
Análise de Percepção do Museu da Montanha e da Girafa
 
SAMY MAHFAR BRINGS MERIT TO HIS LOWER EAST SIDE TENANTS
SAMY MAHFAR BRINGS MERIT TO HIS LOWER EAST SIDE TENANTSSAMY MAHFAR BRINGS MERIT TO HIS LOWER EAST SIDE TENANTS
SAMY MAHFAR BRINGS MERIT TO HIS LOWER EAST SIDE TENANTS
 
STUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLY
STUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLYSTUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLY
STUDY ON INTERSECTION AT 26TH MILE, KANJIRAPPALLY
 
24hrs Camp Per Rome Camp 2008
24hrs Camp  Per Rome Camp 200824hrs Camp  Per Rome Camp 2008
24hrs Camp Per Rome Camp 2008
 
TEDxVicenza_2016_Social_Networking_Analysis
TEDxVicenza_2016_Social_Networking_AnalysisTEDxVicenza_2016_Social_Networking_Analysis
TEDxVicenza_2016_Social_Networking_Analysis
 
Relatório de estágio - TÉC. EM INFORMÁTICA
Relatório de estágio - TÉC. EM INFORMÁTICARelatório de estágio - TÉC. EM INFORMÁTICA
Relatório de estágio - TÉC. EM INFORMÁTICA
 
Print media analysis January 2017
Print media analysis January 2017 Print media analysis January 2017
Print media analysis January 2017
 
Moch irsan wahyuda
Moch irsan wahyudaMoch irsan wahyuda
Moch irsan wahyuda
 
Sustainable models
Sustainable modelsSustainable models
Sustainable models
 
Manual completo Marca Personal
Manual completo Marca PersonalManual completo Marca Personal
Manual completo Marca Personal
 
Dok holidej 011 gvozdeni konj
Dok holidej 011   gvozdeni konjDok holidej 011   gvozdeni konj
Dok holidej 011 gvozdeni konj
 

Similar to DrupalCon Barcelona 2015 - Drupal Extreme Scaling

Chris Ward - Understanding databases for distributed docker applications - No...
Chris Ward - Understanding databases for distributed docker applications - No...Chris Ward - Understanding databases for distributed docker applications - No...
Chris Ward - Understanding databases for distributed docker applications - No...
NoSQLmatters
 

Similar to DrupalCon Barcelona 2015 - Drupal Extreme Scaling (20)

Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with Docker
 
Getting started with MariaDB with Docker
Getting started with MariaDB with DockerGetting started with MariaDB with Docker
Getting started with MariaDB with Docker
 
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12cDocker in the Oracle Universe / WebLogic 12c / OFM 12c
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
 
Docker 1.9 Workshop
Docker 1.9 WorkshopDocker 1.9 Workshop
Docker 1.9 Workshop
 
From Monolith to Docker Distributed Applications
From Monolith to Docker Distributed ApplicationsFrom Monolith to Docker Distributed Applications
From Monolith to Docker Distributed Applications
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
Docker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to DockerDocker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to Docker
 
Docker for Multi-Cloud Apps
Docker for Multi-Cloud AppsDocker for Multi-Cloud Apps
Docker for Multi-Cloud Apps
 
Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
Docker 101 for Oracle DBAs - Oracle OpenWorld 2017Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
Docker 101 for Oracle DBAs - Oracle OpenWorld 2017
 
Linux containers & Devops
Linux containers & DevopsLinux containers & Devops
Linux containers & Devops
 
Docker Demystified for SB JUG
Docker Demystified for SB JUGDocker Demystified for SB JUG
Docker Demystified for SB JUG
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.
 
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
 
An efficient data mining solution by integrating Spark and Cassandra
An efficient data mining solution by integrating Spark and CassandraAn efficient data mining solution by integrating Spark and Cassandra
An efficient data mining solution by integrating Spark and Cassandra
 
Virtualizing Apache Spark and Machine Learning with Justin Murray
Virtualizing Apache Spark and Machine Learning with Justin MurrayVirtualizing Apache Spark and Machine Learning with Justin Murray
Virtualizing Apache Spark and Machine Learning with Justin Murray
 
mesos-devoxx14
mesos-devoxx14mesos-devoxx14
mesos-devoxx14
 
Chris Ward - Understanding databases for distributed docker applications - No...
Chris Ward - Understanding databases for distributed docker applications - No...Chris Ward - Understanding databases for distributed docker applications - No...
Chris Ward - Understanding databases for distributed docker applications - No...
 
Stratio big data spain
Stratio   big data spainStratio   big data spain
Stratio big data spain
 
Running a business in the Cloud with AWS
Running a business in the Cloud with AWSRunning a business in the Cloud with AWS
Running a business in the Cloud with AWS
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 

More from zekivazquez

More from zekivazquez (14)

Drupal Dev Days 2018 - Autopsy of Vulnerabilities
Drupal Dev Days 2018 - Autopsy of VulnerabilitiesDrupal Dev Days 2018 - Autopsy of Vulnerabilities
Drupal Dev Days 2018 - Autopsy of Vulnerabilities
 
DrupalCamp Spain 2018: CSI, autopsia de vulnerabilidades
DrupalCamp Spain 2018: CSI, autopsia de vulnerabilidadesDrupalCamp Spain 2018: CSI, autopsia de vulnerabilidades
DrupalCamp Spain 2018: CSI, autopsia de vulnerabilidades
 
Hacking a sistemas CMS
Hacking a sistemas CMSHacking a sistemas CMS
Hacking a sistemas CMS
 
Security for Human Beings
Security for Human BeingsSecurity for Human Beings
Security for Human Beings
 
Information is Power
Information is PowerInformation is Power
Information is Power
 
Hackea tu propia Harley
Hackea tu propia HarleyHackea tu propia Harley
Hackea tu propia Harley
 
Seguridad para todos
Seguridad para todosSeguridad para todos
Seguridad para todos
 
Hack & Beers - Seguridad en Drupal
Hack & Beers - Seguridad en DrupalHack & Beers - Seguridad en Drupal
Hack & Beers - Seguridad en Drupal
 
Hacking & Hardening Drupal
Hacking & Hardening DrupalHacking & Hardening Drupal
Hacking & Hardening Drupal
 
Hacking Drupal - Anatomía de una auditoría de seguridad
Hacking Drupal - Anatomía de una auditoría de seguridadHacking Drupal - Anatomía de una auditoría de seguridad
Hacking Drupal - Anatomía de una auditoría de seguridad
 
Taller Drupal - Jornadas Software Libre UCA
Taller Drupal - Jornadas Software Libre UCATaller Drupal - Jornadas Software Libre UCA
Taller Drupal - Jornadas Software Libre UCA
 
Desarrollo Seguro en Drupal - DrupalCamp Spain 2013
Desarrollo Seguro en Drupal - DrupalCamp Spain 2013Desarrollo Seguro en Drupal - DrupalCamp Spain 2013
Desarrollo Seguro en Drupal - DrupalCamp Spain 2013
 
Betabeers Sevilla - Hacking web con OWASP
Betabeers Sevilla - Hacking web con OWASPBetabeers Sevilla - Hacking web con OWASP
Betabeers Sevilla - Hacking web con OWASP
 
Hacking web con OWASP
Hacking web con OWASPHacking web con OWASP
Hacking web con OWASP
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

DrupalCon Barcelona 2015 - Drupal Extreme Scaling

  • 1.
  • 2. Who’s me? Zequi V´azquez DevOps & Backend PhD student Hacking & Security Rock’n’Roll (electric guitarist) Videogames Books Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 3. 1 Introduction 2 The Project 3 Problems and Solutions 4 Demo 5 Conclusions Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 4. 1 Introduction 2 The Project 3 Problems and Solutions 4 Demo 5 Conclusions Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 5. Drupal performance, scalabilty & availability Memcache Apc / Opcache Varnish Redundancy Choose your cache improvement module Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 6. Cloud computing and containers Elastic computing → resources grow on demand In theory, we achieve full scalability and availability. False! The hidden enemy: budget grows till infinity and beyond Containers (Docker) → Only for local environments? Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 7. 1 Introduction 2 The Project 3 Problems and Solutions 4 Demo 5 Conclusions Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 8. Some base requirements Built in Drupal 7, as a multisite install At first, +30k sites. It needs to scale up to +100k sites Availability close to 99.999 % Of course, high performance at lowest possible cost Need to control site creation from external app Automated and not-disruptive deployments Ability to execute drush commands on all sites Migration from previous platform Three devs only - frontend, backend and devops Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 9. Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 10. Seems scary, uh? Usual techs are not enough to tackle project We are “computer scientists”, aren’t we? God bless Open Source Stairway to heaven cloud Docker is more than local Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 11. Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 12. Drupal over Nginx and PHP-fpm Nginx allow a real very flexible configuration PHP fpm increases performance significantly Mod Security with custom rules for Drupal Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 13. Manage sites on a multisite Drupal Node.JS is asynchronous: execute something, and forget about it Use DynamoDB to store a list of deployed sites API to allow batch operations on sites list Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 14. Stateless Drupal container Memcache, MySQL, MongoDB as external services S3fs module → all files on S3 Emails sent through PostMark Monitorization using NewRelic Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 15. The Cluster: Apache Mesos and Marathon Mesos abstracts the resources and creates a cluster Two masters orchestrated by Zookeeper, one or more workers Marathon allows to run Docker containers Chronos allows to run cron jobs Rest API to manage apps and containers Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 16. Mesos over AWS EC2 image for autoscaling from Mesos main worker AMI contains all 3 Docker images Script to sync amount of Marathon apps with workers number Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 17. Deployments: And automatization for all . . . Lazy DevOps is best DevOps Ansible let us manage AWS in a simple (and powerful!) way Makefile + Dockerfile = Over 9000! Create and destroy environments with a single command Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 18. Devil is on details AWS do backups, but it’s worth to create your own recovery plan Security groups for EC2 → inbound and outbound firewall Remember to use protection → Http Auth for all Rest APIs Log centralization is a must → All hail Mesos! Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 19. 1 Introduction 2 The Project 3 Problems and Solutions 4 Demo 5 Conclusions Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 20. Database(s): So you think 30k sites are too much 30k sites on a Drupal multisite means 30k databases MySQL → 1 folder per database, 1 file per table MongoDB preallocates files when a database is created Conclusion? Unmanageable Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 21. Divide and conquer! Identify each site using a unique hash Use that hash as prefix for tables on MySQL and MongoDB Group 500 sites per database, both MongoDB and MySQL MongoDB maximum database size is 3.952GB MySQL number of tables per database is 62k aprox. Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 22. The Way of the Request Ever seen a settings.php with steroids? Connect to DynamoDB Identify domain from the request (both drush and http) Calculate domain unique hash Ask DynamoDB for the database where the site lives Make sure hash is used as prefix Store database reference on Memcache Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 23. In soviet Russia, Nginx configures you Strange timeout when creating a new site from NodeJS app Happened when Node.JS app launched a site creation Fire and forget. When site was created, app is notified Further investigation → timeout produced on Haproxy Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 24. Another brick(s) in the wall Unstability on autoscaling group MongoDB MMS instances out of space PHP-fpm unstability → slowlog Thousand S3 buckets? God bless S3fs Remote & massive Drush Migration: 30k sites on few days AWS RDS speed: the bigger, the better Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 25. 1 Introduction 2 The Project 3 Problems and Solutions 4 Demo 5 Conclusions Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 26. Demo time! Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 27. 1 Introduction 2 The Project 3 Problems and Solutions 4 Demo 5 Conclusions Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 28. Conclusions: Spoiler alert! Project went live on April 2015. Absolute success! Learned a lot about new technologies Cloud + Containers = Profit Drupal flexibility is amazing Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 29. Zequi V´azquez @RabbitLair Drupal #ExtremeScaling
  • 30. Thank you! What did you think? Please, evaluate this session @RabbitLair ezequielvazq[at]gmail[dot]com Zequi V´azquez @RabbitLair Drupal #ExtremeScaling