![Page 1: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/1.jpg)
Scaling Drupal @ iMoneyEdmund Kwok - CTO
P/S We’re
hiring!!
![Page 2: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/2.jpg)
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
![Page 3: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/3.jpg)
Started in Malaysia, to make online applications a reality
![Page 4: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/4.jpg)
![Page 5: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/5.jpg)
![Page 6: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/6.jpg)
![Page 7: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/7.jpg)
![Page 8: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/8.jpg)
![Page 9: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/9.jpg)
![Page 10: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/10.jpg)
![Page 11: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/11.jpg)
![Page 12: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/12.jpg)
![Page 13: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/13.jpg)
![Page 14: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/14.jpg)
![Page 15: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/15.jpg)
![Page 16: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/16.jpg)
![Page 17: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/17.jpg)
![Page 18: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/18.jpg)
Product Marketing
Tech
![Page 19: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/19.jpg)
Product Marketing
Tech3+
Drupal Devs
![Page 20: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/20.jpg)
![Page 21: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/21.jpg)
![Page 22: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/22.jpg)
![Page 23: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/23.jpg)
![Page 24: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/24.jpg)
![Page 25: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/25.jpg)
![Page 26: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/26.jpg)
Native mobile app
![Page 27: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/27.jpg)
Code Infrastructure
Process / People
![Page 28: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/28.jpg)
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
![Page 29: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/29.jpg)
1. Shared codebase
![Page 30: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/30.jpg)
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
![Page 31: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/31.jpg)
2. Think components
![Page 32: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/32.jpg)
![Page 33: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/33.jpg)
![Page 34: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/34.jpg)
![Page 35: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/35.jpg)
Desktop Mobile
![Page 36: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/36.jpg)
Insights CRM
Insights DB
Publishers
Mobile App
Call Operators
Mortgage Consultants
Webapp
Analytics
…
Mortgage Admin
Management
Leads DB
Emails API
Leads Collector
![Page 37: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/37.jpg)
Insights CRM
Publishers
Mobile App
Webapp
…
Call Operators
Mortgage Consultants
Analytics
Mortgage Admin
Management
Leads DB
![Page 38: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/38.jpg)
3. Automate ^ 3
![Page 39: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/39.jpg)
![Page 40: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/40.jpg)
Okay, I will instruct Behat to run these tests and
format the results nicely for you.
![Page 41: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/41.jpg)
Okay, I will instruct Behat to run these tests and
format the results nicely for you.
&
![Page 42: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/42.jpg)
Okay, I will instruct Behat to run these tests and
format the results nicely for you.
&
![Page 43: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/43.jpg)
![Page 44: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/44.jpg)
![Page 45: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/45.jpg)
![Page 46: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/46.jpg)
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
![Page 47: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/47.jpg)
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
![Page 48: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/48.jpg)
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
![Page 49: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/49.jpg)
![Page 50: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/50.jpg)
4. Cache it like it’s hot
![Page 51: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/51.jpg)
Drupal Cache
APC
Boost
nginxPagespeed
Varnish
![Page 52: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/52.jpg)
Varnish rp1
nginxweb1
nginx web2
MySQL db1
IT’S TIME..
FOR A NEW HOUSE
Why?
![Page 53: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/53.jpg)
Varnish rp1
nginxweb1
nginx web2
MySQL db1
nginx web3
nginx web..
![Page 54: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/54.jpg)
Varnish rp1
nginxweb1
nginx web2
MySQL db1
nginx web3
nginx web4
Varnish rp2
HAProxy lb1
MySQL db2
Replication
![Page 55: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/55.jpg)
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
![Page 56: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/56.jpg)
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
![Page 57: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/57.jpg)
![Page 58: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/58.jpg)
At least we haven’t flush Varnish’s cache ;)
![Page 59: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/59.jpg)
5. Empower others
![Page 60: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/60.jpg)
![Page 61: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/61.jpg)
![Page 62: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/62.jpg)
![Page 63: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/63.jpg)
https://github.com/edmundkwok/varnish-inspector
![Page 64: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/64.jpg)
The less time you spend maintaining existing features or content, the more time you will have
to build newer, cooler, stuff
![Page 65: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/65.jpg)
6. Go Lean
![Page 66: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/66.jpg)
![Page 67: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/67.jpg)
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
![Page 68: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/68.jpg)
![Page 69: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/69.jpg)
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
![Page 70: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/70.jpg)
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
![Page 71: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/71.jpg)
![Page 72: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/72.jpg)
![Page 74: Scaling Drupal @ iMoney - DrupalCamp Singapore 2014](https://reader035.vdocuments.mx/reader035/viewer/2022070323/5599ca0c1a28ab0a368b459d/html5/thumbnails/74.jpg)
–Steve Jobs
“A lot of times, people don’t know what they want until you show it
to them.”