scaling drupal @ imoney - drupalcamp singapore 2014
DESCRIPTION
How we use Drupal @ iMoney, the challenges we face as we scaled to 6 different countries, and the learnings along the way.TRANSCRIPT
Scaling Drupal @ iMoneyEdmund Kwok - CTO
P/S We’re
hiring!!
About me..• Started off as Freelance Drupal Site Builder /
Developer / Themer, first dabbled in Drupal 4.7
• Full time as iMoney CTO, Employee #2 in January 2013
• Email: [email protected]
• D.O.: https://drupal.org/user/44079
Started in Malaysia, to make online applications a reality
Product Marketing
Tech
Product Marketing
Tech3+
Drupal Devs
Native mobile app
Code Infrastructure
Process / People
Code
!Infrastructure
!Process /
People
1. Shared code base 2. Think components
3. Automate ^ 3 4. Cache it like it’s hot
5. Empower others 6. Go lean
1. Shared codebase
sites/defaultBase theme
Country theme
Country modules
Content
Common modules
Product page theme
sites/www.my sites/www.sg sites/www.ph sites/www.id sites/www.thiMoney
Webapp repo
Database
iMoney Shared Code base Drupal Multisite
2. Think components
Desktop Mobile
Insights CRM
Insights DB
Publishers
Mobile App
Call Operators
Mortgage Consultants
Webapp
Analytics
…
Mortgage Admin
Management
Leads DB
Emails API
Leads Collector
Insights CRM
Publishers
Mobile App
Webapp
…
Call Operators
Mortgage Consultants
Analytics
Mortgage Admin
Management
Leads DB
3. Automate ^ 3
Okay, I will instruct Behat to run these tests and
format the results nicely for you.
Okay, I will instruct Behat to run these tests and
format the results nicely for you.
&
Okay, I will instruct Behat to run these tests and
format the results nicely for you.
&
Okay, I will do the following:
1. Pull the latest code from repo
2. Gzip the files 3. SSH into the staging
server 4. Backup the DB with drush 5. Backup the existing
staging root directory 6. Deploy to staging root
Okay, I will do the following:
1. Pull the latest code from repo
2. Gzip the files 3. SSH into the staging
server 4. Backup the DB with drush 5. Backup the existing
staging root directory 6. Deploy to staging root
Whatever he said
Okay, I will do the following:
1. Pull the latest code from repo
2. Gzip the files 3. SSH into the staging
server 4. Backup the DB with drush 5. Backup the existing
staging root directory 6. Deploy to staging root
Whatever he said
4. Cache it like it’s hot
Drupal Cache
APC
Boost
nginxPagespeed
Varnish
Varnish rp1
nginxweb1
nginx web2
MySQL db1
IT’S TIME..
FOR A NEW HOUSE
Why?
Varnish rp1
nginxweb1
nginx web2
MySQL db1
nginx web3
nginx web..
Varnish rp1
nginxweb1
nginx web2
MySQL db1
nginx web3
nginx web4
Varnish rp2
HAProxy lb1
MySQL db2
Replication
Drupal Cache APC Boost nginx Pagespeed
“Eh I can’t see the page live”“Did you clear the Boost cache”
“Yeaaa, I did!”“ Hmm, maybe it’s the APC Cache”
“Cleared that too!”“Okay, try clearing Drupal Cache, then APC,
Boost, then Varnish. Oh and nginx Pagespeed!”
“WTFOMGBBQ!@#$”
Varnish
Drupal Cache APC Boost nginx Pagespeed
“Eh I can’t see the page live”“Did you clear the Boost cache”
“Yeaaa, I did!”“ Hmm, maybe it’s the APC Cache”
“Cleared that too!”“Okay, try clearing Drupal Cache, then APC,
Boost, then Varnish. Oh and nginx Pagespeed!”
“WTFOMGBBQ!@#$”
Varnish
At least we haven’t flush Varnish’s cache ;)
5. Empower others
https://github.com/edmundkwok/varnish-inspector
The less time you spend maintaining existing features or content, the more time you will have
to build newer, cooler, stuff
6. Go Lean
Code
!Infrastructure
!Process /
People
1. Shared code base 2. Think components
3. Automate ^ 3 4. Cache it like it’s hot
5. Empower others 6. Go lean
Join us!! :DSenior Drupal
Developer • Engineer solutions for pain
points, build cool stuff
• Continuous learning and growth - get off the Drupal island! AngularJS, Symfony2, Node.JS, Python?
• Make the world a better place
Join us!! :DSenior Drupal
Developer • Engineer solutions for pain
points, build cool stuff
• Continuous learning and growth - get off the Drupal island! AngularJS, Symfony2, Node.JS, Python?
• Make the world a better place
http://im.my/hiremelah (We want to confirm someone by tonight!)
–Steve Jobs
“A lot of times, people don’t know what they want until you show it
to them.”