designing enterprise drupal
Skip this Video
Download Presentation
Designing Enterprise Drupal

Loading in 2 Seconds...

play fullscreen
1 / 15

Designing Enterprise Drupal - PowerPoint PPT Presentation

  • Uploaded on

Designing Enterprise Drupal. Environments. How to scale Drupal server infrastructure. Jason Burnett ( [email protected] ) NeoSpire Director of Network Services Ben Chavet ( [email protected] ) NeoSpire Senior Engineer Brian Skowron ( [email protected] )

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Designing Enterprise Drupal' - malik-hardin

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
designing enterprise drupal

Designing Enterprise Drupal


How to scale Drupal server infrastructure

Jason Burnett ([email protected])

NeoSpire Director of Network Services

Ben Chavet ([email protected])

NeoSpire Senior Engineer

Brian Skowron ([email protected])

NeoSpire Account Executive

so first thing s first
So…first thing’s first
  • Prerequisites that you’ll need (or at least want).
    • A good, reliable network with plenty of capacity
    • At least one expertSystems Administrator
  • You don’t necessarily need this:
but you don t want this
But you don’t want this:

(hopefully this isn’t you)

after you ve fired that guy
After you’ve fired that guy,

let’s talk stacks

Default Stack

Performance Stack

first don t use drupal well sorta
First, don’t use Drupal (well, sorta)
  • Drop-in replacement for Drupal 6.x
  • Support for database replication
  • Support for reverse proxy caching
  • Optimization for MySQL
  • Optimization for PHP 5
  • Available at:
after pressflow it s all about cache
After Pressflow, it’s all about Cache
  • Varnish is a reverse proxy cache
  • Caches content based on HTTP headers
  • Uses kernel-based virtual memory
  • Watch out for cookies, authenticated users
  • Available at
http pipeline
HTTP Pipeline

Apache Configuration

Varnish Configuration

NameVirtualHost *:8080

Listen 8080

<VirtualHost *:8080>



backend default {

.host = "";

.port = "8080";


http logging
HTTP Logging

VarnishNCSA daemon handles logging

Default Apache logs will always show

Define a new log format to use X-Forwarded-For

LogFormat"%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_proxy

CustomLog/var/log/apache2/access.log combined_proxy

caching with cookies
Caching with Cookies

sub vcl_recv {

// Remove has_js and Google Analytics __* cookies.

set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js)=[^;]*", "");

// Remove a ";" prefix, if present.

set req.http.Cookie = regsub(req.http.Cookie, "^;\s*", "");

// Remove empty cookies.

if (req.http.Cookie ~ "^\s*$") {

unset req.http.Cookie;



sub vcl_hash {

// Include cookie in cache hash

if (req.http.Cookie) {

set req.hash += req.http.Cookie;



basic security
Basic Security

// Define the internal network subnets

acl internal {




sub vcl_recv {


// Do not allow outside access to cron.php

if (req.url ~ "^/cron\.php(\?.*)?$" && !client.ip ~ internal) {

set req.url = "/404-cron.php";



varnish is super fast
Varnish is super-fast


Able to handle many more connections than Apache

Needs a large number of file handles

* soft nofile 131072

* hard nofile 131072

apache optimizations
Apache Optimizations
  • Tune apache to match your hardware
  • Setting MaxClients too high is asking for trouble
  • Every application is different
  • A good starting point is total amount of memory allocated to Apache divided by 40MB
  • One of the areas that will need to be monitored and updated on an ongoing basis
still all about cache
Still all about Cache
  • APC Opcode Cache
  • APC is an Opcode cache
  • Officially supported by PHP
  • Prevents unnecessary PHP parsing and compiling
  • Reduces load on Memory and CPU
allocate enough memory
allocate enough memory