12 Tips to Drupal Website Performance

15
12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST

description

Is your Drupal website overweight, sluggish, unresponsive, prone to slowdowns? Don’t wait to hear about it from someone else. Whip your website into shape now with these 12 performance-enhancing tips for developers. This best-practice fitness regimen for a high- performing website takes a few minutes. It’s only a fraction of the time you’d spend troubleshooting.

Transcript of 12 Tips to Drupal Website Performance

Page 1: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITERUNNING AT ITS ABSOLUTE BEST

Page 2: 12 Tips to Drupal Website Performance

VARNISH

Is your website overweight, sluggish, unresponsive, prone to slowdowns? Don’t wait to hear about it from someone else. Whip your website into shape now with these 12 performance-enhancing tips for developers. This best-practice fitness regimen for a high-performing website takes a few minutes. It’s only a fraction of the time you’d spend troubleshooting.

HEY DRUPAL DEVELOPERS,

Page 3: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 3

Optimize your Drupal caching settings and aggregate your CSS and JS

1.

CSS JSDO THIS NOW IF… Your site has slow browser load times.Want to give users a dynamic experience—without heavy backend usage? Configure your caching settings. Whether you’re on Drupal 7 or Drupal 6, you’ll want to configure your Minimum Cache Lifetime, Expiration of Cached Pages and Bandwidth Optimization. Do it right, and get a super-fast, super-light site. Don’t forget to optimize CSS and JavaScript files to significantly speed up browser-render time.

QUICKSTART: There’s a dashboard for that. See if you need to optimize your caching on Pantheon’s Launch Check page. http://getpantheon.com

Page 4: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 4

DO THIS NOW IF… You’ve got downtime and timeouts from database resource contention. When you use Redis as a drop-in replacement for caching, you limit database operations to actual data. This reduces overhead and improves performance. Redis is optimized for high performance storage and retrieval. Installation is fast.

QUICKSTART: Use Pantheon, which offers Redis as a service on most plans.

Use Redis as a caching backend and watch your site run unencumbered

2.

Page 5: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 5

DO THIS NOW IF… You hate looking through log files to pinpoint bottlenecks and bugs. New Relic gives you a real-time look into the performance of your web application.

QUICKSTART: Enable New Relic on Pantheon, and you’ll also accelerate your support process. Now the support team can visualize corresponding performance and symptoms.

Enable New Relic to monitor your site performance and alert you when things go awry

3.

Page 6: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 6

DO THIS NOW IF… You have downtime, probably from increased load on backend systems. Varnish is an HTTP accelerator that quickly serves both static content and anonymous pages for sites on Pantheon. Varnish serves data from virtual memory. That means a response is returned without accessing the application server. This frees DROP workers to build more dynamic requests. Each Varnish server can handle millions of requests per minute. Drupal alone can’t do that. Varnish can also improve the availability of your site. For example, if a PHP fatal error breaks your site, anonymous page requests can still be served by Varnish and end-users won’t realize something is wrong.

QUICKSTART: See if Varnish is caching your site on Pantheon’s Launch Check page. http://getpantheon.com

Make sure Varnish is caching your site4.

VARNISH

Page 7: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 7

DO THIS NOW IF… You want to avoid system failure. PHP Exceptions are errors, and some can cause a site crash. Any PHP error—even a notice—will drastically reduce the speed of PHP execution. Drupal logs exceptions to Watchdog, so check your watchdog logs and fix any PHP notices and warnings you receive.

QUICKSTART: See if your watchdog logs have any PHP notices and warnings on Pantheon’s Launch Check page. http://getpantheon.com

Check your watchdog logs for PHP notices and warnings, and fix them pronto

5.

Page 8: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 8

DO THIS NOW IF… Your site is less stable because it’s missing critical patches, performance updates, and security settings. Drupal Core is constantly being updated. Most updates fix bugs and security issues that keep your website from performing at its best.

QUICKSTART: Use Pantheon, which makes it a no-brainer to keep your site optimized by keeping your core up to date. Most updates don’t require any code or configuration changes.

Make sure you’re using the latest version of Drupal core

6.

Page 9: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 9

DO THIS NOW IF… You’re afraid of permanent data loss and extended downtime. In case of emergency, you want the ability to restore to your backup with one click.

QUICKSTART: Use Pantheon, which makes environment backups a simple, one-click operation. An environment backup consists of a database backup, a files backup, and a code backup. See if your backups are configured on Pantheon’s Launch Check page. http://getpantheon.com

Make sure you have backups configured on your site so you can sleep well at night.

7.

Page 10: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 10

DO THIS NOW IF… Your website has slow response times. You may have noticed increased demand on backend resources like your database and application server. Not every module uses Drupal’s caching out-of-the-box. When you need a granular caching system, look closely at your Views. You’ll see a big bump in site performance when your Query results caching, Rendering output caching, and Block caching are configured properly.

QUICKSTART: Launch Check shows you any problems with your Views Caching settings. http://getpantheon.com

Make sure your Views caching settings are logical

8.

Page 11: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 11

DO THIS NOW IF… You’ve got a large team with a complex development process. If you want to save time, you can use Terminus to perform and script dashboard operations in the same way that you would through the website.

QUICKSTART: Launch Check shows you any problems with your Views Caching settings. http://getpantheon.com

Try performing dashboard operations from the terminal to save time

9.

Page 12: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 12

CDN

DO THIS NOW IF… You have slow load times and bottlenecks, usually due to higher HTTP round-trip times for your assets. A Content Delivery Network quickly delivers content using a mix of caching, advanced seek/indexing technology, and multiple synchronized origins across a geographic area. By minimizing physical latency and allowing quick, smart retrieval of assets from a localized cache, delivery time can be greatly improved.

• Ensures your data is distributed across multiple data centers

• Offers clear usage analytics (better forecasting and planning)

• Improves response times (Edge locations closer to users)

• Handles traffic surges• Offers browser caching for static assets

Use a CDN 10.

Page 13: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 13

DO THIS NOW IF… You’ve ever introduced a new bug in production. Does your site look and work great on your desktop, but load like a dial-up on your smartphone?

QUICKSTART: Here are two free, highly recommended services to help you optimize your site across all browsers, operating systems and smartphone/tablet devices:

• Saucelabs https://saucelabs.com/

• Selenium tests - An example of implementation

Don’t forget to QA 11.

Q A

Page 14: 12 Tips to Drupal Website Performance

12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 14

DO THIS NOW IF… You’re getting ready to launch a website, and don’t want to fail. Don’t know how your application will perform under various loads and peak traffic? Get ready for downtime and failed campaigns. Load testing allows you to plan for the expected traffic—and for success.

QUICKSTART: Enable New Relic to monitor internal execution performance. You don’t need any additional modules or tools. Next, make sure you have access to a command-line environment, preferably with administrative privileges. Finally, only load test on the Live environment. Test for both performance and scalability.

Load test your expected peak traffic12.

Page 15: 12 Tips to Drupal Website Performance

VARNISH

Hold your website accountable to highest performance standards. Give it the best-practice treatment from day one at http://getpantheon.com.

It’s always free in development.

DON’T LET YOUR WEBSITE BE A COUCH POTATO.

LEARN MORE