Search code examples
phpdrupal3-tier

3 tier server architecture with Drupal


Can Drupal be deployed on a 3 tier server architecture (Webserver/ Appserver/ Database)?

Our database tier will have MySQL. Which tier will drupal fit in and what should be used in the remaining tier?


Solution

  • Yes it can.

    • Application Tier is basically a web node of your application. It would have a web server (Apache, Nginx) and Drupal running on it.
    • Data Tier would be a database node with MySQL or MariaDB. You'd just provide its IP address in Drupal's settings.php file and it will just work. You may want to add an extra node for a shared file system you would mount to /sites/default/files.
    • Presentation Tier is a tricky part. You may live without it (thus allowing Drupal's template system to handle the presentation - i.e. Application Tier would handle Presentation too). However, Drupal may be run "headless" - entirely as an API server, which gives you ability to write your own presentation logic (basically, an API client).

    There are some interesting benefits of such a design: you may squeeze in some caching mechanism between Drupal and presentation thus eliminating Drupal's slowness. You may also easily scale Drupal instance horizontally by cloning web nodes. You may even shut down Drupal entirely for an update while presentation layer still serves cached content.

    There are some interesting Headless / decoupled Drupal conference sessions out there: