SlideShare a Scribd company logo
1 of 61
Building Drupal Web
Farms with IIS - Part 1
           Alessandro Pilotti
              @alexpilotti
          MVP ASP.NET / IIS




   MCSD, MCAD, MCSE, MCDBA, MCT
      Red Hat Certified Engineer
Application Request Routing
               2.5
 IIS 7.x add-on installable via WebPI or setup available on
   http://iis.NET
 Features
      HTTP based routing decisions
      Load balance algorithms
      Health monitoring
      Client affinity
      Host name Affinity
      Multiple server groups
      Managing and monitoring by using the UI
      Caching
      SSL offloading
      Failed Request Tracing rules
Web Farm Framework 2.1
 Features
  Integration with ARR
  Platform provisioning
    Including frameworks (PHP, etc)
  Application provisioning via WebDeploy
  Simplified farm management
  Rich UI for monitoring and management
Architecture
Create a Server Farm

After installing ARR and/or WFF the node “Server
Farms” shows up in the tree
Server Farm
 You can enable independently
    Load balancing
    Server farm provisioning
 Enabling server farm provisioning only means that an alternative
   load balancing solution is planned, e.g.:

   Hardware NLB
   Varnish
   Apache + HAProxy
 WFF requires administrator credentials valid on all the hosts
   belonging to the farm

 Creating an ARR farm via GUI creates also URL rewrite rules
Server Farm Details
WFF Server Roles
 WFF is based on the concept of a primary host and multiple
  secondary hosts
 Primary host
   Is the master
   Platform and applications get provisioned to secondary hosts
 Secondary hosts
   Are “clones” of the primary host
 Roles can be switched
   A secondary host can become primary
 Provisioning is customizable
Adding Servers
CLI
 To achieve the same result as seen before:
    appcmd.exe set config -section:webFarms /+"[name='myServerFarm']"
      /commit:apphost
    appcmd.exe set config -section:webFarms
      /+"[name='myServerFarm'].[address=’DrupalWeb1']" /commit:apphost

 URL Rewrite rules:
    appcmd.exe set config -section:system.webServer/rewrite/globalRules
      /+"[name='ARR_myServerFarm_loadbalance', patternSyntax='Wildcard',stopProces
      sing='True']" /commit:apphost
    appcmd.exe set config -section:system.webServer/rewrite/globalRules
      /[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessin
      g='True'].match.url:"*" /commit:apphost
    appcmd.exe set config -section:system.webServer/rewrite/globalRules
      /[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessin
      g='True'].action.type:"Rewrite"
      /[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessin
      g='True'].action.url:"http://myServerFarm/{R:0}" /commit:apphost
ARR Configuration
Health Test
Load Balance
Routing Rules
Server Affinity
Caching
Primary and secondary disk caches are
configured at the server level
Add Drives
Cache Configuration
Cache Warm-up
Cache Rules
Enable Caching in the Farm
Platform Provisioning
Application Provisioning
Failed Request Tracing
 Detailed requests log
   Excellent troubleshooting
    tool

 Launch IIS Manager
 Select web site
   e.g. Default Web Site
 Select Failed Request
  Tracing…
Enable Failed Request
       Tracing
Tracing Rules
 Select Failed Request Tracing Rules in the features
  pane



 Add…
Trace Conditions
Select Providers
Analyze Traces
 Traces are located by default in
   %SystemDrive%inetpubLogsFailedReqLogFiles
 Sections to check:
     GENERAL_REQUEST_HEADERS
     ARR_REQUEST_ROUTED
     ARR_SERVER_STATS
     GENERAL_RESPONSE_HEADERS
     GENERAL_RESPONSE_ENTITY_BUFFER
CLI
 To obtain what we did via GUI:
 appcmd set site "Default Web Site" -
  traceFailedRequestsLogging.enabled:"true" /commit:apphost

 appcmd.exe set config "Default Web Site" -
  section:system.webServer/tracing/traceFailedRequests
  /+"[path='*']”

 appcmd.exe set config "Default Web Site" -
  section:system.webServer/tracing/traceFailedRequests
  /+"[path='*'].traceAreas.[provider='WWW
  Server',areas='Rewrite,RequestRouting',verbosity='Verbose']”

 appcmd.exe set config "Default Web Site" -
  section:system.webServer/tracing/traceFailedRequests
  /[path='*'].failureDefinitions.statusCodes:"200-399"
Shared Config
 Share the same IIS server configuration among two or
  more hosts

 Obtained by saving the configuration files on a network
  share

 An encryption key is set to protect sensitive data
 Web sites reside on shared paths
Export Config
Enable Shared Config
Shared Config
Scenario
Roles
 Load balancer / Farm controller (DrupalARR)
 Web Server 1 (DrupalWeb1)
 Web Server 2 (DrupalWeb2)
 File Server (DrupalFileServer)
 MySQL Server (DrupalDB)
   Note: In our demo and lab, we will install MySQL on DrupalFileServer
     to limit the number of required VMs
DBMS
 Install MySQL on the DBMS server
   Can be Windows, Linux, etc
 CREATE DATABASE MyNewDrupalSite2;
 Enable access to the MySQL database from the web
  servers. E.g.:
   CREATE USER 'MyNewDrupalSite2'@'%' IDENTIFIED BY
    'Passw0rd';
   GRANT ALL On MyNewDrupalSite2.* TO
    'MyNewDrupalSite2'@'%’;

 Note: in the Drupal web apps, connecting to MySQL using
  an IP address is preferred
   Avoid name resolution
Web Farm Hosts
 Web farm hosts (DrupalWeb1 and
 DrupalWeb2)
  Install Web Deploy via WebPI, if not already
   installed
  Disable UAC (User Account Control)
  Enable the following feature through the local
   firewall
    Core Networking
    File And Printer Sharing
    Remote Administration
Web Farm Hosts
 We need a common account with administrator rights
  on the hosts. It can be:
   A domain user
   A user with same username/password on all hosts
   Must be a member of the “Administrators” group
   Check that the user password is not set to expire

   net user wfadmin Passw0rd /add
   wmic path Win32_UserAccount where
    Name='wfadmin' set PasswordExpires=false
   net localgroup administrators wfadmin /add
Drupal Web Site
 Create a Drupal web site on the primary server
  (DrupalWeb1)
   Via WebPI or manually
     As seen in the previous lessons
   Install all necessary components
     PHP 5.3, PHP Manager, WinCache, URL Rewrite
   Point the Drupal DB configuration to the database on the
    DBMS server
     For performance reasons, consider using an IP address
       instead of name resolution

 WFF will later use WebDeploy to replicate the site to
  the secondary servers (DrupalWeb2 in our case)
Load Balancer ARR
 Install ARR 2.5 and WFF 2.1 via WebPI
ARR
 Open IIS Manager and create Web Farm.
     Note: if IIS Manager was open during the setup of ARR, it
      needs to be closed and reopened to be able to access
      the installed features.


Server Farm Details
 Set the wfadmin user you created in the previous steps
Add Primary Host to the Farm
 In our case, DrupalWeb1 will become the primary
  server

 This host contains the Drupal web site(s) to be served
  by the farm (can be added later)
Add Secondary Hosts to the
         Farm
URL Rewrite Rules
 Create local URL Rewrite rules. This is the base of the
  redirection process!
Platform Provisioning
 At this point, platform and application synchronization
  between the hosts takes place.
 Platform tools and frameworks that are available on the
  primary server get installed on the other servers.
 Afterwards, application pools, sites and applications will
  be synchronized
 Provisoning can be started manually
 Check secondary web farm hosts afterwards
Platform Provisioning
ARR – Configure Health Test
ARR – Check Health Test
ARR – Set Affinity Cookie




Note: a distributed session management should
also be evaluated.
The “drupalwp” User
 Create a common user on:
   DrupalFileServer
   DrupalWeb1
   DrupalWeb2
 No privileges required
   net user drupalwp Passw0rd /add
   wmic path Win32_UserAccount where
    Name=’drupalwp' set PasswordExpires=false
   Check that the user password is not set to expire
 Repeat on all the above hosts
WP Identity
 On the primary server, in IIS Manager, open the server
  node, click on Application Pools and on the Drupal web
  site application pool.
 Click on “Advanced Settings…”
 Change the Identity to the drupalwp user and set it to
  “drupalwp”
 In the PHP.ini configuration file on the PHP version
  used by the Drupal web site, set
   fastcgi.impersonate = 0
 For performance, make sure also that WinCache is
  enabled.
Shared Storage Access
 Drupal requires a shared “files” directory accessed by the
  web farm hosts
 Can be hosted on a SMB share
 As an alternative FS sync solutions could be applied
   DFS, rsync, WebDeploy, etc
 A valid user must exist on the web farm hosts and on the file
  server. It can be:
   A domain account
   A local user with same username and password
 Proper permissions need to be set on the SMB share
Folder Permissions
 Create a directory where you want to store your Drupal
  shared data
   E.g: C:DataMyNewDrupalSite
   Add write permissions for the user “drupalwp”
SMB Share
 Create an SMB share for the directory and add
  read/write permissions for the user “drupalwp”
CLI
 md C:DataMyNewDrupalSite
 icacls C:DataMyNewDrupalSite /grant
  drupalwp:(OI)(CI)(RX,W)

 net share
  MyNewDrupalSite=C:DataMyNewDrupalSite
  /grant:wpuser,Change
Troubleshoot SMB Access
 From the web farm hosts (DrupalWeb1, DrupalWeb2) try to access
   the shared folder with the identity of the WP user:

 Runas /u:drupalwp cmd
 In the drupalwp command prompt:
 net use drupaltest05MyNewDrupalSite
 echo test > drupaltest05MyNewDrupalSitetest.txt
 dir drupaltest05MyNewDrupalSite
 File exists: ok
 del drupaltest05MyNewDrupalSitetest.txt
Drupal Configuration
 Log on the drupal web site as administrator and go to:
   Administer -> Site Configuration -> File System
 Set the “File System”, “Temp” path on the shared
  storage area.
   Create a separate share on the file server for the “Private”
     path if necessary
Drupal Configuration
Drupal 6 Caveat
 Drupal 6.19 published on WebPI doesn’t support UNC
  paths. This can be easily solved with the following code
  patch:

      File           includes/file.inc
      Line           126
      Original       if (!is_writable($directory)) {

      Modified       if (!touch($directory)) {

More Related Content

What's hot

APC PowerChute Shutdown Utility for Apache Web Server -- User ...
APC PowerChute Shutdown Utility for Apache Web Server -- User ...APC PowerChute Shutdown Utility for Apache Web Server -- User ...
APC PowerChute Shutdown Utility for Apache Web Server -- User ...
webhostingguy
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
webhostingguy
 
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nycJohn Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
SharePoint Saturday NY
 
APACHE
APACHEAPACHE
APACHE
ARJUN
 
Apache web server
Apache web serverApache web server
Apache web server
zrstoppe
 

What's hot (19)

Apache Ppt
Apache PptApache Ppt
Apache Ppt
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Power shell
Power shellPower shell
Power shell
 
APC PowerChute Shutdown Utility for Apache Web Server -- User ...
APC PowerChute Shutdown Utility for Apache Web Server -- User ...APC PowerChute Shutdown Utility for Apache Web Server -- User ...
APC PowerChute Shutdown Utility for Apache Web Server -- User ...
 
Apache
ApacheApache
Apache
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Spring Boot Actuator
Spring Boot ActuatorSpring Boot Actuator
Spring Boot Actuator
 
Apache Tutorial
Apache TutorialApache Tutorial
Apache Tutorial
 
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nycJohn Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
 
Web server installation_configuration_apache
Web server installation_configuration_apacheWeb server installation_configuration_apache
Web server installation_configuration_apache
 
APACHE
APACHEAPACHE
APACHE
 
SOA OSB suite cluster installation
SOA OSB suite cluster installationSOA OSB suite cluster installation
SOA OSB suite cluster installation
 
Servlets
ServletsServlets
Servlets
 
Technical Aspects of SLiMS
Technical Aspects of SLiMSTechnical Aspects of SLiMS
Technical Aspects of SLiMS
 
Apache web server
Apache web serverApache web server
Apache web server
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 
DevOps Meetup ansible
DevOps Meetup   ansibleDevOps Meetup   ansible
DevOps Meetup ansible
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 

Viewers also liked

ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365
ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365
ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365
ITCamp
 
How to make money with Suse
How to make money with SuseHow to make money with Suse
How to make money with Suse
SalesExchange
 
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp
 

Viewers also liked (8)

Veeam Cloud Connect Replication
Veeam Cloud Connect ReplicationVeeam Cloud Connect Replication
Veeam Cloud Connect Replication
 
Configuring The Network Server
Configuring The Network ServerConfiguring The Network Server
Configuring The Network Server
 
ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365
ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365
ITCamp 2012 - Paul Roman - Hybrid solutions in Office 365
 
How to make money with Suse
How to make money with SuseHow to make money with Suse
How to make money with Suse
 
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
 
OpenStack + Nano Server + Hyper-V + S2D
OpenStack + Nano Server + Hyper-V + S2DOpenStack + Nano Server + Hyper-V + S2D
OpenStack + Nano Server + Hyper-V + S2D
 
Building a Microsoft cloud with open technologies
Building a Microsoft cloud with open technologiesBuilding a Microsoft cloud with open technologies
Building a Microsoft cloud with open technologies
 
Step by Step Installation of Microsoft SQL Server 2012
Step by Step Installation of Microsoft SQL Server 2012 Step by Step Installation of Microsoft SQL Server 2012
Step by Step Installation of Microsoft SQL Server 2012
 

Similar to Building drupal web farms with IIS - part 1

Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02
arghya007
 

Similar to Building drupal web farms with IIS - part 1 (20)

Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 
Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02Red5workshop 090619073420-phpapp02
Red5workshop 090619073420-phpapp02
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 
Laravel presentation
Laravel presentationLaravel presentation
Laravel presentation
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
 
How to scheduled jobs in a cloudera cluster without oozie
How to scheduled jobs in a cloudera cluster without oozieHow to scheduled jobs in a cloudera cluster without oozie
How to scheduled jobs in a cloudera cluster without oozie
 
Deployment ibm connections - No Http Server required
Deployment ibm connections - No Http Server requiredDeployment ibm connections - No Http Server required
Deployment ibm connections - No Http Server required
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
 
NGINX Can Do That? Test Drive Your Config File!
NGINX Can Do That? Test Drive Your Config File!NGINX Can Do That? Test Drive Your Config File!
NGINX Can Do That? Test Drive Your Config File!
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
How to create a secured cloudera cluster
How to create a secured cloudera clusterHow to create a secured cloudera cluster
How to create a secured cloudera cluster
 
Deploying SharePoint @ Cloud
Deploying SharePoint @ CloudDeploying SharePoint @ Cloud
Deploying SharePoint @ Cloud
 
Build cloud os in one day belgium
Build cloud os in one day   belgiumBuild cloud os in one day   belgium
Build cloud os in one day belgium
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 

More from Alessandro Pilotti

Interoperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitInteroperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-Init
Alessandro Pilotti
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova Compute
Alessandro Pilotti
 

More from Alessandro Pilotti (13)

OpenStack and Windows - What's new in Ocata
OpenStack and Windows - What's new in OcataOpenStack and Windows - What's new in Ocata
OpenStack and Windows - What's new in Ocata
 
Strategies for migrating workloads from VMware to OpenStack
Strategies for migrating workloads from VMware to OpenStackStrategies for migrating workloads from VMware to OpenStack
Strategies for migrating workloads from VMware to OpenStack
 
Puppet + Windows Nano Server
Puppet + Windows Nano ServerPuppet + Windows Nano Server
Puppet + Windows Nano Server
 
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsOpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
 
Interoperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitInteroperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-Init
 
OpenStack and Windows
OpenStack and WindowsOpenStack and Windows
OpenStack and Windows
 
An HTML5 client to connect to the Hyper-V console
An HTML5 client to connect to the Hyper-V consoleAn HTML5 client to connect to the Hyper-V console
An HTML5 client to connect to the Hyper-V console
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova Compute
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on Windows
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
Managing Drupal on Windows with Drush
Managing Drupal on Windows with DrushManaging Drupal on Windows with Drush
Managing Drupal on Windows with Drush
 
Windows Loves drupal
Windows Loves drupalWindows Loves drupal
Windows Loves drupal
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Building drupal web farms with IIS - part 1

  • 1. Building Drupal Web Farms with IIS - Part 1 Alessandro Pilotti @alexpilotti MVP ASP.NET / IIS MCSD, MCAD, MCSE, MCDBA, MCT Red Hat Certified Engineer
  • 2. Application Request Routing 2.5  IIS 7.x add-on installable via WebPI or setup available on http://iis.NET  Features  HTTP based routing decisions  Load balance algorithms  Health monitoring  Client affinity  Host name Affinity  Multiple server groups  Managing and monitoring by using the UI  Caching  SSL offloading  Failed Request Tracing rules
  • 3. Web Farm Framework 2.1  Features  Integration with ARR  Platform provisioning  Including frameworks (PHP, etc)  Application provisioning via WebDeploy  Simplified farm management  Rich UI for monitoring and management
  • 5. Create a Server Farm After installing ARR and/or WFF the node “Server Farms” shows up in the tree
  • 6. Server Farm  You can enable independently  Load balancing  Server farm provisioning  Enabling server farm provisioning only means that an alternative load balancing solution is planned, e.g.:  Hardware NLB  Varnish  Apache + HAProxy  WFF requires administrator credentials valid on all the hosts belonging to the farm  Creating an ARR farm via GUI creates also URL rewrite rules
  • 8. WFF Server Roles  WFF is based on the concept of a primary host and multiple secondary hosts  Primary host  Is the master  Platform and applications get provisioned to secondary hosts  Secondary hosts  Are “clones” of the primary host  Roles can be switched  A secondary host can become primary  Provisioning is customizable
  • 10. CLI  To achieve the same result as seen before:  appcmd.exe set config -section:webFarms /+"[name='myServerFarm']" /commit:apphost  appcmd.exe set config -section:webFarms /+"[name='myServerFarm'].[address=’DrupalWeb1']" /commit:apphost  URL Rewrite rules:  appcmd.exe set config -section:system.webServer/rewrite/globalRules /+"[name='ARR_myServerFarm_loadbalance', patternSyntax='Wildcard',stopProces sing='True']" /commit:apphost  appcmd.exe set config -section:system.webServer/rewrite/globalRules /[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessin g='True'].match.url:"*" /commit:apphost  appcmd.exe set config -section:system.webServer/rewrite/globalRules /[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessin g='True'].action.type:"Rewrite" /[name='ARR_myServerFarm_loadbalance',patternSyntax='Wildcard',stopProcessin g='True'].action.url:"http://myServerFarm/{R:0}" /commit:apphost
  • 16. Caching Primary and secondary disk caches are configured at the server level
  • 21. Enable Caching in the Farm
  • 24. Failed Request Tracing  Detailed requests log  Excellent troubleshooting tool  Launch IIS Manager  Select web site  e.g. Default Web Site  Select Failed Request Tracing…
  • 26. Tracing Rules  Select Failed Request Tracing Rules in the features pane  Add…
  • 29. Analyze Traces  Traces are located by default in  %SystemDrive%inetpubLogsFailedReqLogFiles  Sections to check:  GENERAL_REQUEST_HEADERS  ARR_REQUEST_ROUTED  ARR_SERVER_STATS  GENERAL_RESPONSE_HEADERS  GENERAL_RESPONSE_ENTITY_BUFFER
  • 30. CLI  To obtain what we did via GUI:  appcmd set site "Default Web Site" - traceFailedRequestsLogging.enabled:"true" /commit:apphost  appcmd.exe set config "Default Web Site" - section:system.webServer/tracing/traceFailedRequests /+"[path='*']”  appcmd.exe set config "Default Web Site" - section:system.webServer/tracing/traceFailedRequests /+"[path='*'].traceAreas.[provider='WWW Server',areas='Rewrite,RequestRouting',verbosity='Verbose']”  appcmd.exe set config "Default Web Site" - section:system.webServer/tracing/traceFailedRequests /[path='*'].failureDefinitions.statusCodes:"200-399"
  • 31. Shared Config  Share the same IIS server configuration among two or more hosts  Obtained by saving the configuration files on a network share  An encryption key is set to protect sensitive data  Web sites reside on shared paths
  • 36. Roles  Load balancer / Farm controller (DrupalARR)  Web Server 1 (DrupalWeb1)  Web Server 2 (DrupalWeb2)  File Server (DrupalFileServer)  MySQL Server (DrupalDB)  Note: In our demo and lab, we will install MySQL on DrupalFileServer to limit the number of required VMs
  • 37. DBMS  Install MySQL on the DBMS server  Can be Windows, Linux, etc  CREATE DATABASE MyNewDrupalSite2;  Enable access to the MySQL database from the web servers. E.g.:  CREATE USER 'MyNewDrupalSite2'@'%' IDENTIFIED BY 'Passw0rd';  GRANT ALL On MyNewDrupalSite2.* TO 'MyNewDrupalSite2'@'%’;  Note: in the Drupal web apps, connecting to MySQL using an IP address is preferred  Avoid name resolution
  • 38. Web Farm Hosts  Web farm hosts (DrupalWeb1 and DrupalWeb2)  Install Web Deploy via WebPI, if not already installed  Disable UAC (User Account Control)  Enable the following feature through the local firewall  Core Networking  File And Printer Sharing  Remote Administration
  • 39. Web Farm Hosts  We need a common account with administrator rights on the hosts. It can be:  A domain user  A user with same username/password on all hosts  Must be a member of the “Administrators” group  Check that the user password is not set to expire  net user wfadmin Passw0rd /add  wmic path Win32_UserAccount where Name='wfadmin' set PasswordExpires=false  net localgroup administrators wfadmin /add
  • 40. Drupal Web Site  Create a Drupal web site on the primary server (DrupalWeb1)  Via WebPI or manually  As seen in the previous lessons  Install all necessary components  PHP 5.3, PHP Manager, WinCache, URL Rewrite  Point the Drupal DB configuration to the database on the DBMS server  For performance reasons, consider using an IP address instead of name resolution  WFF will later use WebDeploy to replicate the site to the secondary servers (DrupalWeb2 in our case)
  • 41. Load Balancer ARR  Install ARR 2.5 and WFF 2.1 via WebPI
  • 42. ARR  Open IIS Manager and create Web Farm.  Note: if IIS Manager was open during the setup of ARR, it needs to be closed and reopened to be able to access the installed features. 
  • 43. Server Farm Details  Set the wfadmin user you created in the previous steps
  • 44. Add Primary Host to the Farm  In our case, DrupalWeb1 will become the primary server  This host contains the Drupal web site(s) to be served by the farm (can be added later)
  • 45. Add Secondary Hosts to the Farm
  • 46. URL Rewrite Rules  Create local URL Rewrite rules. This is the base of the redirection process!
  • 47. Platform Provisioning  At this point, platform and application synchronization between the hosts takes place.  Platform tools and frameworks that are available on the primary server get installed on the other servers.  Afterwards, application pools, sites and applications will be synchronized  Provisoning can be started manually  Check secondary web farm hosts afterwards
  • 49. ARR – Configure Health Test
  • 50. ARR – Check Health Test
  • 51. ARR – Set Affinity Cookie Note: a distributed session management should also be evaluated.
  • 52. The “drupalwp” User  Create a common user on:  DrupalFileServer  DrupalWeb1  DrupalWeb2  No privileges required  net user drupalwp Passw0rd /add  wmic path Win32_UserAccount where Name=’drupalwp' set PasswordExpires=false  Check that the user password is not set to expire  Repeat on all the above hosts
  • 53. WP Identity  On the primary server, in IIS Manager, open the server node, click on Application Pools and on the Drupal web site application pool.  Click on “Advanced Settings…”  Change the Identity to the drupalwp user and set it to “drupalwp”  In the PHP.ini configuration file on the PHP version used by the Drupal web site, set  fastcgi.impersonate = 0  For performance, make sure also that WinCache is enabled.
  • 54. Shared Storage Access  Drupal requires a shared “files” directory accessed by the web farm hosts  Can be hosted on a SMB share  As an alternative FS sync solutions could be applied  DFS, rsync, WebDeploy, etc  A valid user must exist on the web farm hosts and on the file server. It can be:  A domain account  A local user with same username and password  Proper permissions need to be set on the SMB share
  • 55. Folder Permissions  Create a directory where you want to store your Drupal shared data  E.g: C:DataMyNewDrupalSite  Add write permissions for the user “drupalwp”
  • 56. SMB Share  Create an SMB share for the directory and add read/write permissions for the user “drupalwp”
  • 57. CLI  md C:DataMyNewDrupalSite  icacls C:DataMyNewDrupalSite /grant drupalwp:(OI)(CI)(RX,W)  net share MyNewDrupalSite=C:DataMyNewDrupalSite /grant:wpuser,Change
  • 58. Troubleshoot SMB Access  From the web farm hosts (DrupalWeb1, DrupalWeb2) try to access the shared folder with the identity of the WP user:  Runas /u:drupalwp cmd  In the drupalwp command prompt:  net use drupaltest05MyNewDrupalSite  echo test > drupaltest05MyNewDrupalSitetest.txt  dir drupaltest05MyNewDrupalSite  File exists: ok  del drupaltest05MyNewDrupalSitetest.txt
  • 59. Drupal Configuration  Log on the drupal web site as administrator and go to:  Administer -> Site Configuration -> File System  Set the “File System”, “Temp” path on the shared storage area.  Create a separate share on the file server for the “Private” path if necessary
  • 61. Drupal 6 Caveat  Drupal 6.19 published on WebPI doesn’t support UNC paths. This can be easily solved with the following code patch: File includes/file.inc Line 126 Original if (!is_writable($directory)) { Modified if (!touch($directory)) {