SlideShare a Scribd company logo
1 of 26
Pavithra Raman - Team Lead, Solution Architect
Enhancing Back End Drupal
Development & Performance
Drupal 8 Lessons From the Field
Agenda
Recap: Importance of Speed & Performance
Common Causes & Effects
Best practices & Checkpoints
Recap: Importance of Speed & Performance
END USER EXPERIENCE
Expect fast page loads / reloads
Faster interactions
Channels no longer restricted to websites
Decoupled and mobile applications
Integration with 3rd party for richer and
personalized journey
Impacts
END USER EXPERIENCE
More wait time - customers move on
Lesser or irrelevant information - seek another
source
Website only - leads only via SEO/ADs
SEO - affected
Multi-channel experience affected -
mobile/tablet based audience left behind
But why is it happening ?
Fight the good fight, but compromise
Designer/Marketer Developer
?
● Customer experience
● Larger Media assets
● More features
● Goal: Visually attractive
and engaging experience
● Server side performance
● Content generation
● Reduce response time
● Goal: Cacheable and
scalable content/asset
creation & delivery
Drupal - very powerful Content Management / Digital
Experience System
Lot of features
Content
Taxonomy
Media
Templating engine
User management
API First
Panelizers
Workflow
e-commerce
and many many more ….
With great power
comes great
responsibility
Common Causes
Biggest/Obvious causes
- Drupal Architecture
- Site planning
- Business logic via customizations
- Caching missing
- Drupal configuration
- Server Architecture
Common Causes
Smaller/Hidden causes ( we might miss
these )
- MySQL slow queries
- Information architecture
- 3rd Party integrations
- Content Display / Theme ( What ? )
- Slow Complex code (CPU/RAM
spikes)
Effects
- Number requests dropped
- Slow Drupal requests
- PHP max timeout
- Server CPU/RAM maxing out
- MySQL server overload
- Impacts on the front end delivery
- Easy target for DDoS attacks
- Unusable content editorial
Oh… I will just solve it
using decoupled
Node.js Server side
rendering is faster you
know
Uhhh.. Well….
❏ Yes, but not completely.
❏ Content creation is still happening via the Drupal UI for
many of these applications.
❏ Any custom logic or 3rd party integrations to connect
other sources might be invoked via the Drupal layer
❏ You still need fast performing APIs
13 ©2016 Acquia Inc. — Confidential and Proprietary
Best practices & Checkpoints
Understand end user
experience
Business requirements
Custom Logic
3rd party integration
Editorial add-ons
Ideal experience
benchmarks
Information
architecture
Module selection
Library selection
Function reuse
Content reuse
Drupal setup
Customizations as per
Drupal Coding
standards
Caching
Performance test /
PHP profiling with
development
Front End + Theming
Drupal Request
profiling
MySQL slow query log
Load Testing
Acquia Insight
Requirements Architecture Implementation Testing / QA
Does the experience require any complex
front end components like display effects,
asynchronous content refresh, rich media
experience, etc.
Does the application need any complex data
processing, presentation logic, dynamic
components ?
Does the 3rd party integration provide you with
hi-speed APIs? Does this 3rd party add
more load to your code? Does your
application have to do more processing on
the Drupal layer?
Requirements Review Samples
For the content editorial experience, do we
need any add-ons for image processing,
WYSIWYG editors, in-line editors, heavy
media/assets uploaded, complex and heavy
data structures for content?
From the perspective of various users, content
consumers, content editors, media
managers, decoupled applications
connecting to the Drupal backend what are
the response benchmarks?
- Maintain Drupal core and contributed modules at
latest stable version
- Custom modules as per Drupal Code-standards
- Drupal API + Hooks
- PHP, OOPS, Symphony
- JS
- CSS
- Select modules as per current and future requirements
Architecture Best Practices
- Client side caching
- Varnish cache
- Drupal Internal Dynamic Page cache
- Drupal Internal Page cache
- Page cache max time ( dependent on
content update frequency )
- Memcache
- APC - opcode cache
- Uninstall unused modules
Implementation Best Practices
- Optimized Images/Media
- Responsive images/pages via different
images
- Aggregation and compression of JS/CSS
- Bigpipe
- Lazy Loading
- Clean twig templates
Tools: Unit testing - Dev
- XDebug + XHProf - PHP profiler
- Devel module
- Automated tests: Behat, Drupal
- Google Pagespeed Insights
- Acquia Insight
What to test for ( against ideal benchmarks )
- Resource utilization ( CPU, RAM, PHP
procs, cache)
- Cache hit ratio
- MySQL utilization / Slow queries
- OutOfMemory = OOM errors
- Response time
Testing & Tuning
Pre-Production: Before Go Live
Test on Production-like setup
- Resource utilization
- Cache hit ratio
- Database performance
- Load Tests
- Acquia Insight
GO LIVE !! Server deployment
Drupal Optimized Server setup
Caching
Logs
Production Optimized Drupal
Configuration
- Front end asset / page cache using
- Varnish/CDN
- Load Balancing for easy scaling
- Web server optimized for Drupal
- PHP with
- APCu for PHP code cache
- memcache ext +
- Dedicated or co-hosted memcached
for Drupal cache tables
- MySQL optimized for Drupal
- Read/Write optimized storage
- Dedication Cron server if required
Production - Checklist
- Disable Database Logging
- Enable syslog ( to send logs to server
logging system )
- Disable non-production required modules
- ex. modules enabled for testing
- Views UI, Config UI
- Page cache settings
- Page + Blocks + Views + Others
- API cache & security setup
- Aggregate & compress - JS + CSS
Questions
Thank You
200-500ms
“Good” TTFB (Time To First Byte)
https://www.rackaid.com/blog/time-to-first-byte/
1s to 3s
“Good” TTLB (Time To Last Byte)
https://yoast.com/page-speed-ranking-factor/
Page weight
http://www.httparchive.org/interesting.php (October 16th)
Page weight
http://www.httparchive.org/interesting.php (October 16th)
Average LTE
speed is 5-
12Mbps
This page would
take 2-5 seconds
to download!
Images
http://www.httparchive.org/interesting.php (October 16th)
54%

More Related Content

What's hot

SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP Portal
 
Oracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal StrategyOracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal Strategy
Fumiko Yamashita
 
What's new in HANA SPS7 - SAP HANA UI Integration Services
What's new in HANA SPS7 - SAP HANA UI Integration ServicesWhat's new in HANA SPS7 - SAP HANA UI Integration Services
What's new in HANA SPS7 - SAP HANA UI Integration Services
SAP Portal
 
Benefits of using liferay
Benefits of using liferay Benefits of using liferay
Benefits of using liferay
SKALI Group
 
Acquia partner webinar_canada
Acquia partner webinar_canadaAcquia partner webinar_canada
Acquia partner webinar_canada
Acquia
 

What's hot (20)

Drupal content management system (cms) based e commerce portal
Drupal content management system (cms) based e commerce portalDrupal content management system (cms) based e commerce portal
Drupal content management system (cms) based e commerce portal
 
Shockingly Fast Site Development with Acquia Lightning 4.0
Shockingly Fast Site Development with Acquia Lightning 4.0Shockingly Fast Site Development with Acquia Lightning 4.0
Shockingly Fast Site Development with Acquia Lightning 4.0
 
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
 
OneWeb: Unifying multi-brand experience management and digital operations wit...
OneWeb: Unifying multi-brand experience management and digital operations wit...OneWeb: Unifying multi-brand experience management and digital operations wit...
OneWeb: Unifying multi-brand experience management and digital operations wit...
 
Acquia Business Mandate Deck Final
Acquia Business Mandate Deck FinalAcquia Business Mandate Deck Final
Acquia Business Mandate Deck Final
 
Oracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal StrategyOracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal Strategy
 
SAP HANA Cloud Portal - Deep Dive
SAP HANA Cloud Portal - Deep DiveSAP HANA Cloud Portal - Deep Dive
SAP HANA Cloud Portal - Deep Dive
 
SAP HANA Cloud - Virtual Bootcamp 6: SAP HANA Cloud and the use of the SAP HA...
SAP HANA Cloud - Virtual Bootcamp 6: SAP HANA Cloud and the use of the SAP HA...SAP HANA Cloud - Virtual Bootcamp 6: SAP HANA Cloud and the use of the SAP HA...
SAP HANA Cloud - Virtual Bootcamp 6: SAP HANA Cloud and the use of the SAP HA...
 
Acquia Platform Updates and Capabilities
Acquia Platform Updates and CapabilitiesAcquia Platform Updates and Capabilities
Acquia Platform Updates and Capabilities
 
Mobile Backend as a Service via Cloud Foundry
Mobile Backend as a Service via Cloud FoundryMobile Backend as a Service via Cloud Foundry
Mobile Backend as a Service via Cloud Foundry
 
20071204 Arc Ready Software + Services
20071204   Arc Ready   Software + Services20071204   Arc Ready   Software + Services
20071204 Arc Ready Software + Services
 
Microservices Architecture for e-Commerce
Microservices Architecture for e-CommerceMicroservices Architecture for e-Commerce
Microservices Architecture for e-Commerce
 
What's new in HANA SPS7 - SAP HANA UI Integration Services
What's new in HANA SPS7 - SAP HANA UI Integration ServicesWhat's new in HANA SPS7 - SAP HANA UI Integration Services
What's new in HANA SPS7 - SAP HANA UI Integration Services
 
Benefits of using liferay
Benefits of using liferay Benefits of using liferay
Benefits of using liferay
 
e-Business by Accesa
e-Business by Accesae-Business by Accesa
e-Business by Accesa
 
Hana ui services nov2013 #sapmm
Hana ui services nov2013 #sapmmHana ui services nov2013 #sapmm
Hana ui services nov2013 #sapmm
 
September Partner Bootcamp
September Partner BootcampSeptember Partner Bootcamp
September Partner Bootcamp
 
Why choose-liferay
Why choose-liferayWhy choose-liferay
Why choose-liferay
 
Acquia partner webinar_canada
Acquia partner webinar_canadaAcquia partner webinar_canada
Acquia partner webinar_canada
 
IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016
 

Similar to Drupal 8 Lessons From the Field: Part 3 - The Drupal Backend

Web Application Development using PHP and MySQL
Web Application Development using PHP and MySQLWeb Application Development using PHP and MySQL
Web Application Development using PHP and MySQL
Ganesh Kamath
 

Similar to Drupal 8 Lessons From the Field: Part 3 - The Drupal Backend (20)

Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
The PRPL Pattern
The PRPL PatternThe PRPL Pattern
The PRPL Pattern
 
Drupal Performance Audit and Optimization
Drupal Performance Audit and OptimizationDrupal Performance Audit and Optimization
Drupal Performance Audit and Optimization
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
 
Web Application Performance Audit and Optimization
Web Application Performance Audit and OptimizationWeb Application Performance Audit and Optimization
Web Application Performance Audit and Optimization
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Performance Optimization in Drupal 8
Performance Optimization in Drupal 8Performance Optimization in Drupal 8
Performance Optimization in Drupal 8
 
Scaling PHP Applications with Zend Platform
Scaling PHP Applications with Zend PlatformScaling PHP Applications with Zend Platform
Scaling PHP Applications with Zend Platform
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
 
BrownSites: Building and Managing a CMS Infrastructure for Higher Ed
BrownSites: Building and Managing a CMS Infrastructure for Higher EdBrownSites: Building and Managing a CMS Infrastructure for Higher Ed
BrownSites: Building and Managing a CMS Infrastructure for Higher Ed
 
Web Application Development using PHP and MySQL
Web Application Development using PHP and MySQLWeb Application Development using PHP and MySQL
Web Application Development using PHP and MySQL
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaum
 
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
 
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
 
Porting an Open Source Lp Solver to Web Assembly
 Porting an Open Source Lp Solver to Web Assembly Porting an Open Source Lp Solver to Web Assembly
Porting an Open Source Lp Solver to Web Assembly
 
Performance testing with your eyes wide open geekweek 2018
Performance testing with your eyes wide open  geekweek 2018Performance testing with your eyes wide open  geekweek 2018
Performance testing with your eyes wide open geekweek 2018
 
Improve Your Frontend Agility with Proven Optimization Methods
Improve Your Frontend Agility with Proven Optimization MethodsImprove Your Frontend Agility with Proven Optimization Methods
Improve Your Frontend Agility with Proven Optimization Methods
 
App engine feature
App engine featureApp engine feature
App engine feature
 

More from Acquia

Taking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next LevelTaking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next Level
Acquia
 

More from Acquia (20)

Acquia_Adcetera Webinar_Marketing Automation.pdf
Acquia_Adcetera Webinar_Marketing Automation.pdfAcquia_Adcetera Webinar_Marketing Automation.pdf
Acquia_Adcetera Webinar_Marketing Automation.pdf
 
Acquia Webinar Deck - 9_13 .pdf
Acquia Webinar Deck - 9_13 .pdfAcquia Webinar Deck - 9_13 .pdf
Acquia Webinar Deck - 9_13 .pdf
 
Taking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next LevelTaking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next Level
 
CDP for Retail Webinar with Appnovation - Q2 2022.pdf
CDP for Retail Webinar with Appnovation - Q2 2022.pdfCDP for Retail Webinar with Appnovation - Q2 2022.pdf
CDP for Retail Webinar with Appnovation - Q2 2022.pdf
 
May Partner Bootcamp 2022
May Partner Bootcamp 2022May Partner Bootcamp 2022
May Partner Bootcamp 2022
 
April Partner Bootcamp 2022
April Partner Bootcamp 2022April Partner Bootcamp 2022
April Partner Bootcamp 2022
 
How to Unify Brand Experience: A Hootsuite Story
How to Unify Brand Experience: A Hootsuite Story How to Unify Brand Experience: A Hootsuite Story
How to Unify Brand Experience: A Hootsuite Story
 
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CXUsing Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
 
Improve Code Quality and Time to Market: 100% Cloud-Based Development Workflow
Improve Code Quality and Time to Market: 100% Cloud-Based Development WorkflowImprove Code Quality and Time to Market: 100% Cloud-Based Development Workflow
Improve Code Quality and Time to Market: 100% Cloud-Based Development Workflow
 
August partner bootcamp
August partner bootcampAugust partner bootcamp
August partner bootcamp
 
July 2021 Partner Bootcamp
July  2021 Partner BootcampJuly  2021 Partner Bootcamp
July 2021 Partner Bootcamp
 
May Partner Bootcamp
May Partner BootcampMay Partner Bootcamp
May Partner Bootcamp
 
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASYDRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
 
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead MachineWork While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
 
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B LeadsAcquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
 
April partner bootcamp deck cookieless future
April partner bootcamp deck  cookieless futureApril partner bootcamp deck  cookieless future
April partner bootcamp deck cookieless future
 
How to enhance cx through personalised, automated solutions
How to enhance cx through personalised, automated solutionsHow to enhance cx through personalised, automated solutions
How to enhance cx through personalised, automated solutions
 
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
 
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
 
Leave Local Dev Behind: Start Writing Your Code In The Cloud
Leave Local Dev Behind: Start Writing Your Code In The CloudLeave Local Dev Behind: Start Writing Your Code In The Cloud
Leave Local Dev Behind: Start Writing Your Code In The Cloud
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Drupal 8 Lessons From the Field: Part 3 - The Drupal Backend

  • 1. Pavithra Raman - Team Lead, Solution Architect Enhancing Back End Drupal Development & Performance Drupal 8 Lessons From the Field
  • 2. Agenda Recap: Importance of Speed & Performance Common Causes & Effects Best practices & Checkpoints
  • 3. Recap: Importance of Speed & Performance END USER EXPERIENCE Expect fast page loads / reloads Faster interactions Channels no longer restricted to websites Decoupled and mobile applications Integration with 3rd party for richer and personalized journey
  • 4. Impacts END USER EXPERIENCE More wait time - customers move on Lesser or irrelevant information - seek another source Website only - leads only via SEO/ADs SEO - affected Multi-channel experience affected - mobile/tablet based audience left behind
  • 5. But why is it happening ?
  • 6. Fight the good fight, but compromise Designer/Marketer Developer ? ● Customer experience ● Larger Media assets ● More features ● Goal: Visually attractive and engaging experience ● Server side performance ● Content generation ● Reduce response time ● Goal: Cacheable and scalable content/asset creation & delivery
  • 7. Drupal - very powerful Content Management / Digital Experience System Lot of features Content Taxonomy Media Templating engine User management API First Panelizers Workflow e-commerce and many many more …. With great power comes great responsibility
  • 8. Common Causes Biggest/Obvious causes - Drupal Architecture - Site planning - Business logic via customizations - Caching missing - Drupal configuration - Server Architecture
  • 9. Common Causes Smaller/Hidden causes ( we might miss these ) - MySQL slow queries - Information architecture - 3rd Party integrations - Content Display / Theme ( What ? ) - Slow Complex code (CPU/RAM spikes)
  • 10. Effects - Number requests dropped - Slow Drupal requests - PHP max timeout - Server CPU/RAM maxing out - MySQL server overload - Impacts on the front end delivery - Easy target for DDoS attacks - Unusable content editorial
  • 11. Oh… I will just solve it using decoupled Node.js Server side rendering is faster you know
  • 12. Uhhh.. Well…. ❏ Yes, but not completely. ❏ Content creation is still happening via the Drupal UI for many of these applications. ❏ Any custom logic or 3rd party integrations to connect other sources might be invoked via the Drupal layer ❏ You still need fast performing APIs
  • 13. 13 ©2016 Acquia Inc. — Confidential and Proprietary Best practices & Checkpoints Understand end user experience Business requirements Custom Logic 3rd party integration Editorial add-ons Ideal experience benchmarks Information architecture Module selection Library selection Function reuse Content reuse Drupal setup Customizations as per Drupal Coding standards Caching Performance test / PHP profiling with development Front End + Theming Drupal Request profiling MySQL slow query log Load Testing Acquia Insight Requirements Architecture Implementation Testing / QA
  • 14. Does the experience require any complex front end components like display effects, asynchronous content refresh, rich media experience, etc. Does the application need any complex data processing, presentation logic, dynamic components ? Does the 3rd party integration provide you with hi-speed APIs? Does this 3rd party add more load to your code? Does your application have to do more processing on the Drupal layer? Requirements Review Samples For the content editorial experience, do we need any add-ons for image processing, WYSIWYG editors, in-line editors, heavy media/assets uploaded, complex and heavy data structures for content? From the perspective of various users, content consumers, content editors, media managers, decoupled applications connecting to the Drupal backend what are the response benchmarks?
  • 15. - Maintain Drupal core and contributed modules at latest stable version - Custom modules as per Drupal Code-standards - Drupal API + Hooks - PHP, OOPS, Symphony - JS - CSS - Select modules as per current and future requirements Architecture Best Practices
  • 16. - Client side caching - Varnish cache - Drupal Internal Dynamic Page cache - Drupal Internal Page cache - Page cache max time ( dependent on content update frequency ) - Memcache - APC - opcode cache - Uninstall unused modules Implementation Best Practices - Optimized Images/Media - Responsive images/pages via different images - Aggregation and compression of JS/CSS - Bigpipe - Lazy Loading - Clean twig templates
  • 17. Tools: Unit testing - Dev - XDebug + XHProf - PHP profiler - Devel module - Automated tests: Behat, Drupal - Google Pagespeed Insights - Acquia Insight What to test for ( against ideal benchmarks ) - Resource utilization ( CPU, RAM, PHP procs, cache) - Cache hit ratio - MySQL utilization / Slow queries - OutOfMemory = OOM errors - Response time Testing & Tuning Pre-Production: Before Go Live Test on Production-like setup - Resource utilization - Cache hit ratio - Database performance - Load Tests - Acquia Insight
  • 18. GO LIVE !! Server deployment Drupal Optimized Server setup Caching Logs Production Optimized Drupal Configuration
  • 19. - Front end asset / page cache using - Varnish/CDN - Load Balancing for easy scaling - Web server optimized for Drupal - PHP with - APCu for PHP code cache - memcache ext + - Dedicated or co-hosted memcached for Drupal cache tables - MySQL optimized for Drupal - Read/Write optimized storage - Dedication Cron server if required Production - Checklist - Disable Database Logging - Enable syslog ( to send logs to server logging system ) - Disable non-production required modules - ex. modules enabled for testing - Views UI, Config UI - Page cache settings - Page + Blocks + Views + Others - API cache & security setup - Aggregate & compress - JS + CSS
  • 22. 200-500ms “Good” TTFB (Time To First Byte) https://www.rackaid.com/blog/time-to-first-byte/
  • 23. 1s to 3s “Good” TTLB (Time To Last Byte) https://yoast.com/page-speed-ranking-factor/
  • 25. Page weight http://www.httparchive.org/interesting.php (October 16th) Average LTE speed is 5- 12Mbps This page would take 2-5 seconds to download!