SlideShare una empresa de Scribd logo
Installing Drupal globally
Kalle Varisvirta
Technology Director
Exove
@kvirta
Prerequisites?
Moderate knowledge of Drupal and its architecture
Moderate understanding of PHP, MySQL, Varnish and
hosting of this software
What you’ll learn
in this session?
Why do you need to serve the whole world with a
single Drupal installation?
How can it be done?
What are the pros and cons of each method?
Why distribute?
Isn’t the internet already,
like, global?
HTTP GET
Traveling around
the world
takes time
200 OK
...but the data has
to come back, too
Scandinavia - Japan
350 - 400 ms
US - India
250 - 300 ms
UK - Australia
300 - 350 ms
Network latencyICMP round-trip
Why is latency bad?
ICMP (ping) round-trip isn’t the whole truth
Over 300 milliseconds of network latency will make
your lightning-fast website seem sluggish
All continents your site is in business with should be
served with a local server
Anonymous traffic onto a Drupal
site?
Easy.
Anonymous traffic
Use a CDN to cache your site
No CDN? Install a local Varnish on all continents, use
GeoDNS for directing traffic to the local copy
Don’t replicate data if you’re just focusing on
anonymous. Totally not worth it.
Master
CDN
edge
CDN
edge
CDN
edge
CDN
edge
Writes to master
One master with CDN
Does everybody do it?
host www.heraldsun.com.au
www.heraldsun.com.au is an alias for
fw.heraldsun.com.au.edgesuite.net.
fw.heraldsun.com.au.edgesuite.net is an
alias for a1501.g.akamai.net.
a1501.g.akamai.net has address
184.85.223.139
a1501.g.akamai.net has address
Drupal-driven community site with
a lot of write traffic?
You’re in for some configuration,
installation and tuning.
It’s always about the
MySQL
Syndicating Drupal /
write traffic
Two options:
Write to master, replicate to local
Write to local, synchronize the world
Write to master,
replicate to local
PHP can read-write split MySQL traffic
Not problem-free on Drupal, needing a tiny hack to
core
Files can be synced with rsync, as long as writing only
happens towards the master
Master
Slave
Slave
Writes to master
One master, replicated
slaves, read/write split on
database level
Write to master,
replicate to local
Cons
Writes take quite a while, so posting comments
might seem very slow
Surprisingly many things in Drupal write to the
database
Due to replication lag, the sites might be slightly out
of date every once in a while
Write traffic
Two options:
Write to master, replicate to local
Write to local, synchronize the world
Write to local,
synchronize the world
Writing to local and synchronizing the world has been
very hard to accomplish
Master-master replications have been usually third-
party systems, like Galera
In MySQL 5.6 there’s a new possibility, MySQL GTID-
based replication ring with multiple masters
Write to local,
synchronize the world
GTIDs are Global Transaction Identifiers and with them,
we can create a multi-master replication ring topology
In replication ring topology, all MySQL nodes work as
slaves to the previous nodes, adding local writes to the
transaction log stream, thus being master for the next
node
With GTIDs in place, multiple masters have their own
ids in the transaction log and the transaction items
won’t collide
Write to local,
synchronize the world
Replication ring allows fast writes to local and fast read
from local
For Drupal, this is invisible
Only change needed is to make MySQL ignore
collisions in the cache table
Master
Master
Master
Multi-master MySQL ring
topology (GTID)
Write to local,
synchronize the world
Files can be synced with file syncing filesystems, like
GlusterFS
We’ve found Unison to be most robust and giving the
least overhead to the filesystem
Unison is just a piece of software syncing filesystems
on disk - not a filesystem itself
But, hey.
I only have couple
of things to syndicate.
Application level
syndication
Distribute content via Drupal’s own syndication
methods
Works for some content, but not nearly everything
All sites are separate and have to be configured
separately
Works for, say, country sites wanting to show the
corporate news, ie. partial content
Application level
syndication
Feeds can be used to both feed and import
Services can be also used, but requires either
queuing or both servers up at all times
HTTP connections over the world can be
surprisingly unreliable
Recap
Recap
Distribute if you serve the world
There are no tricks to fool the speed of light
Recap
For anonymous, use a CDN
For logged in users, choose the right solution for the
task
For a lot of writes, you need to write locally and
synchronize the world
If you do that, MySQL GTID multi-master ring
topology works
Recap
Application level integration between the Drupals can
be done
Just don’t try to syndicate everything
Make sure you don’t try to syndicate too much at a
time
Feeds works, Services works
Thank you!
Questions?
Thank you!

Más contenido relacionado

La actualidad más candente

Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
Amazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for HomeAmazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services
 
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Wei Shan Ang
 
Growing MongoDB on AWS
Growing MongoDB on AWSGrowing MongoDB on AWS
Growing MongoDB on AWS
colinthehowe
 

La actualidad más candente (18)

Introducing MongoDB in a multi-site HA environment
Introducing MongoDB in a multi-site HA environmentIntroducing MongoDB in a multi-site HA environment
Introducing MongoDB in a multi-site HA environment
 
Big Data in a Public Cloud
Big Data in a Public CloudBig Data in a Public Cloud
Big Data in a Public Cloud
 
RedisConf17- Redis as a Primary Data Store
RedisConf17- Redis as a Primary Data StoreRedisConf17- Redis as a Primary Data Store
RedisConf17- Redis as a Primary Data Store
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
 
How to Meet Your P99 Goal While Overcommitting Another Workload
How to Meet Your P99 Goal While Overcommitting Another WorkloadHow to Meet Your P99 Goal While Overcommitting Another Workload
How to Meet Your P99 Goal While Overcommitting Another Workload
 
Amazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for HomeAmazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for Home
 
Building Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KLBuilding Scalable Web Apps - LVL.UP KL
Building Scalable Web Apps - LVL.UP KL
 
Real world capacity
Real world capacityReal world capacity
Real world capacity
 
Gdg using docker to streamline development
Gdg using docker to streamline developmentGdg using docker to streamline development
Gdg using docker to streamline development
 
Drush
DrushDrush
Drush
 
Local Development Environments
Local Development EnvironmentsLocal Development Environments
Local Development Environments
 
StripeEu Twistedbytes Presentation
StripeEu Twistedbytes PresentationStripeEu Twistedbytes Presentation
StripeEu Twistedbytes Presentation
 
High Performance Wordpress
High Performance WordpressHigh Performance Wordpress
High Performance Wordpress
 
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
 
Growing MongoDB on AWS
Growing MongoDB on AWSGrowing MongoDB on AWS
Growing MongoDB on AWS
 
Avoiding Data Hotspots at Scale
Avoiding Data Hotspots at ScaleAvoiding Data Hotspots at Scale
Avoiding Data Hotspots at Scale
 
SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy  SparkSpark in the Big Data dark by Sergey Levandovskiy
SparkSpark in the Big Data dark by Sergey Levandovskiy
 
Spark in the BigData dark
Spark in the BigData darkSpark in the BigData dark
Spark in the BigData dark
 

Similar a Installing Drupal Globally - DrupalCamp Stockholm 2014

Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
Cal Henderson
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
guest18a0f1
 
Drupal Backend Performance and Scalability
Drupal Backend Performance and ScalabilityDrupal Backend Performance and Scalability
Drupal Backend Performance and Scalability
Ashok Modi
 
Midwest php 2013 deploying php on paas- why & how
Midwest php 2013   deploying php on paas- why & howMidwest php 2013   deploying php on paas- why & how
Midwest php 2013 deploying php on paas- why & how
dotCloud
 

Similar a Installing Drupal Globally - DrupalCamp Stockholm 2014 (20)

Percona Live 2014 - Scaling MySQL in AWS
Percona Live 2014 - Scaling MySQL in AWSPercona Live 2014 - Scaling MySQL in AWS
Percona Live 2014 - Scaling MySQL in AWS
 
RDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and PatternsRDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and Patterns
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
Scalable Web Arch
Scalable Web ArchScalable Web Arch
Scalable Web Arch
 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of view
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
 
Auto Europe's ongoing journey with MariaDB and open source
Auto Europe's ongoing journey with MariaDB and open sourceAuto Europe's ongoing journey with MariaDB and open source
Auto Europe's ongoing journey with MariaDB and open source
 
Scaling symfony apps
Scaling symfony appsScaling symfony apps
Scaling symfony apps
 
Drupal Backend Performance and Scalability
Drupal Backend Performance and ScalabilityDrupal Backend Performance and Scalability
Drupal Backend Performance and Scalability
 
Drupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp NorthDrupal Performance : DrupalCamp North
Drupal Performance : DrupalCamp North
 
Running MySQL in AWS
Running MySQL in AWSRunning MySQL in AWS
Running MySQL in AWS
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Midwest php 2013 deploying php on paas- why & how
Midwest php 2013   deploying php on paas- why & howMidwest php 2013   deploying php on paas- why & how
Midwest php 2013 deploying php on paas- why & how
 
Performance and Scalability
Performance and ScalabilityPerformance and Scalability
Performance and Scalability
 

Más de Exove

Más de Exove (20)

Data security in the age of GDPR – most common data security problems
Data security in the age of GDPR – most common data security problemsData security in the age of GDPR – most common data security problems
Data security in the age of GDPR – most common data security problems
 
Provisioning infrastructure to AWS using Terraform – Exove
Provisioning infrastructure to AWS using Terraform – ExoveProvisioning infrastructure to AWS using Terraform – Exove
Provisioning infrastructure to AWS using Terraform – Exove
 
Advanced custom fields in Wordpress
Advanced custom fields in WordpressAdvanced custom fields in Wordpress
Advanced custom fields in Wordpress
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – Exove
 
Jenkins and visual regression – Exove
Jenkins and visual regression – ExoveJenkins and visual regression – Exove
Jenkins and visual regression – Exove
 
Server-side React with Headless CMS – Exove
Server-side React with Headless CMS – ExoveServer-side React with Headless CMS – Exove
Server-side React with Headless CMS – Exove
 
WebSockets in Bravo Dashboard – Exove
WebSockets in Bravo Dashboard – ExoveWebSockets in Bravo Dashboard – Exove
WebSockets in Bravo Dashboard – Exove
 
Diversity in recruitment
Diversity in recruitmentDiversity in recruitment
Diversity in recruitment
 
Saavutettavuus liiketoimintana
Saavutettavuus liiketoimintanaSaavutettavuus liiketoimintana
Saavutettavuus liiketoimintana
 
Saavutettavuus osana Eläkeliiton verkkosivu-uudistusta
Saavutettavuus osana Eläkeliiton verkkosivu-uudistustaSaavutettavuus osana Eläkeliiton verkkosivu-uudistusta
Saavutettavuus osana Eläkeliiton verkkosivu-uudistusta
 
Mitä saavutettavuusdirektiivi pitää sisällään
Mitä saavutettavuusdirektiivi pitää sisälläänMitä saavutettavuusdirektiivi pitää sisällään
Mitä saavutettavuusdirektiivi pitää sisällään
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8
 
GDPR for developers
GDPR for developersGDPR for developers
GDPR for developers
 
Managing Complexity and Privacy Debt with Drupal
Managing Complexity and Privacy Debt with DrupalManaging Complexity and Privacy Debt with Drupal
Managing Complexity and Privacy Debt with Drupal
 
Life with digital services after GDPR
Life with digital services after GDPRLife with digital services after GDPR
Life with digital services after GDPR
 
GDPR - no beginning no end
GDPR - no beginning no endGDPR - no beginning no end
GDPR - no beginning no end
 
Developing truly personalised experiences
Developing truly personalised experiencesDeveloping truly personalised experiences
Developing truly personalised experiences
 
Customer Experience and Personalisation
Customer Experience and PersonalisationCustomer Experience and Personalisation
Customer Experience and Personalisation
 
Adventures In Programmatic Branding – How To Design With Algorithms And How T...
Adventures In Programmatic Branding – How To Design With Algorithms And How T...Adventures In Programmatic Branding – How To Design With Algorithms And How T...
Adventures In Programmatic Branding – How To Design With Algorithms And How T...
 
Dataohjattu asiakaskokemus
Dataohjattu asiakaskokemusDataohjattu asiakaskokemus
Dataohjattu asiakaskokemus
 

Último

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Último (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 

Installing Drupal Globally - DrupalCamp Stockholm 2014

  • 1. Installing Drupal globally Kalle Varisvirta Technology Director Exove @kvirta
  • 2. Prerequisites? Moderate knowledge of Drupal and its architecture Moderate understanding of PHP, MySQL, Varnish and hosting of this software
  • 3. What you’ll learn in this session? Why do you need to serve the whole world with a single Drupal installation? How can it be done? What are the pros and cons of each method?
  • 4. Why distribute? Isn’t the internet already, like, global?
  • 7. 200 OK ...but the data has to come back, too
  • 8. Scandinavia - Japan 350 - 400 ms US - India 250 - 300 ms UK - Australia 300 - 350 ms Network latencyICMP round-trip
  • 9. Why is latency bad? ICMP (ping) round-trip isn’t the whole truth Over 300 milliseconds of network latency will make your lightning-fast website seem sluggish All continents your site is in business with should be served with a local server
  • 10. Anonymous traffic onto a Drupal site? Easy.
  • 11. Anonymous traffic Use a CDN to cache your site No CDN? Install a local Varnish on all continents, use GeoDNS for directing traffic to the local copy Don’t replicate data if you’re just focusing on anonymous. Totally not worth it.
  • 13. Does everybody do it? host www.heraldsun.com.au www.heraldsun.com.au is an alias for fw.heraldsun.com.au.edgesuite.net. fw.heraldsun.com.au.edgesuite.net is an alias for a1501.g.akamai.net. a1501.g.akamai.net has address 184.85.223.139 a1501.g.akamai.net has address
  • 14. Drupal-driven community site with a lot of write traffic? You’re in for some configuration, installation and tuning.
  • 15. It’s always about the MySQL
  • 16. Syndicating Drupal / write traffic Two options: Write to master, replicate to local Write to local, synchronize the world
  • 17. Write to master, replicate to local PHP can read-write split MySQL traffic Not problem-free on Drupal, needing a tiny hack to core Files can be synced with rsync, as long as writing only happens towards the master
  • 18. Master Slave Slave Writes to master One master, replicated slaves, read/write split on database level
  • 19. Write to master, replicate to local Cons Writes take quite a while, so posting comments might seem very slow Surprisingly many things in Drupal write to the database Due to replication lag, the sites might be slightly out of date every once in a while
  • 20. Write traffic Two options: Write to master, replicate to local Write to local, synchronize the world
  • 21. Write to local, synchronize the world Writing to local and synchronizing the world has been very hard to accomplish Master-master replications have been usually third- party systems, like Galera In MySQL 5.6 there’s a new possibility, MySQL GTID- based replication ring with multiple masters
  • 22. Write to local, synchronize the world GTIDs are Global Transaction Identifiers and with them, we can create a multi-master replication ring topology In replication ring topology, all MySQL nodes work as slaves to the previous nodes, adding local writes to the transaction log stream, thus being master for the next node With GTIDs in place, multiple masters have their own ids in the transaction log and the transaction items won’t collide
  • 23. Write to local, synchronize the world Replication ring allows fast writes to local and fast read from local For Drupal, this is invisible Only change needed is to make MySQL ignore collisions in the cache table
  • 25. Write to local, synchronize the world Files can be synced with file syncing filesystems, like GlusterFS We’ve found Unison to be most robust and giving the least overhead to the filesystem Unison is just a piece of software syncing filesystems on disk - not a filesystem itself
  • 26. But, hey. I only have couple of things to syndicate.
  • 27. Application level syndication Distribute content via Drupal’s own syndication methods Works for some content, but not nearly everything All sites are separate and have to be configured separately Works for, say, country sites wanting to show the corporate news, ie. partial content
  • 28. Application level syndication Feeds can be used to both feed and import Services can be also used, but requires either queuing or both servers up at all times HTTP connections over the world can be surprisingly unreliable
  • 29. Recap
  • 30. Recap Distribute if you serve the world There are no tricks to fool the speed of light
  • 31. Recap For anonymous, use a CDN For logged in users, choose the right solution for the task For a lot of writes, you need to write locally and synchronize the world If you do that, MySQL GTID multi-master ring topology works
  • 32. Recap Application level integration between the Drupals can be done Just don’t try to syndicate everything Make sure you don’t try to syndicate too much at a time Feeds works, Services works