To be able to loadbalance my company website, I've created the following setup on two Dell PowerEdge R200 hosts:
- Loadbalancers (esxi 4.0 guests: master on host0, backup on host1)
Debian - LVS+Keepalived
Loadbalancing algoritm - Round Robin
- Webserver guests (esxi 4.0 guests: 1 guest on host0, 1guest on host1)
Windows Server 2008 R2 - tasks: DC/AD, Webserver, Fileserver (only used for DFS), SQL Server 2008 Enterprise
DFS (Distributed File System) - I placed the DNN files in here
SQL Peer-To-Peer Transactional Replication - DNN Website database is being replicated between the hosts
Both hosts are connected with a crosscable on a gigabit interface.
Context
Since I'm a student and this is my first startup, my budget is very limited. DotNetNuke Professional edition unfortunately is not an option for me at this point. Sebastian Leopold pointed me to PowerDNN's PowerCache, however I'm affraid this also is too expensive for me at this point. I am able to use fairly expensive Microsoft software, since I'm enrolled in the BizSpark program.
Furthermore, forgive me for stupid remarks. I don't have an IT background (law-student).
Loadbalancing probably isn't needed, since the only tasks of the hosts are to host the company website (1 DNN website) and to host the product's server-application (ASP.Net/C#). I bought two servers, since I could get my hands on them second-hand for the same price as one new server, still with 2 years Dell warranty. So I'm trying to utilize the resources and I like to try things.
This is what I've done to get the DNN site (I'm running 5.3.1) working on both guests:
- Windows Server 2008 R2 preperation
- Created a DFS share, which is being replicated to local folders
- Installed MS SQL Server 2008 Enterprise (Default Instance / Mixed Mode authentication)
- IIS7 preparation
- Created an AD-domain user "DNNUser"
- Set file permissions (Users > Full Control) on the local folder to which DFS replicates
- Set file permissions ("DNNUser" > Full Control) on C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
Had to take ownership of that folder to be able to change the permissions.
- IIS Manager > Application Pools > DefaultAppPool > Advanced Settings > Load User Profile = True
- IIS Manager > New website
- Application pool > DefaultAppPool
- Physical path pointing to the DNN instance local folder to which DFS replicates
- Physical path > Connect as "DNNUser"
- Locally on desktop - I created the DNN site.
- Locally on desktop - Created the portal aliasses needed for the site to run on the hosts
- Locally on desktop - Attached the Database.MDF to SQL Server 2008 Express with SSMS
- Locally on desktop - Made a SQL Full backup with SSMS
- Restored this backup at both SQL Server 2008 Enterprise (both installed as default instance on each guest).
- Gave the restored backups the same database name ("DNN001") in SSMS.
- SSMS > Security > Logins > Created SQL user "SQLUser"
- Added "SQLUser" to RESTOREDDB > Security > Users (checking all Owned Schema's and Role Members, except db_denydataread, db_denydatawriter, guest)
- DNN web.config > modified connection strings under <connectionStrings> and <appSettings> for SQL Server 2008
- Made sure the site was working on both guests
- Configured SQL Server peer-to-peer transactional replication
Following Kasim Wirama's (KORONX2004) tutorial on YouTube "Peer to peer in SQL 2008 Demo"
Only difference that my DB's are named identically ("DNN001") on both guests as opposed to Kasim which uses "ticketsales_1" on guest1 and "ticketsales_2" on guest2.
After this I tried to apply the steps described in the "DotNetNuke Webfarm Support" PDF, however I was only able to complete step 1: DNN web.config > "EnableWebFarmSupport" = true
Step 2 (DBLoggingProvider) was already configured as the document described. Figured this was because the document is 5 years old.
Step 3 (Machine Keys) was pretty straightforward in my situation.
Step 4 (Host Menu > Schedule configuration). The "Run On Servers" item doesn't show an inputbox (figured this option is only available in DNN Professional), so there wasn't that much to configure, except for enabling one scheduled item that wasn't enabled by default (can't remember which one).
Step 5 (Caching Provider): I don't have access to a BroadcastPolling Caching Provider. DNN Professional and PowerDNN's PowerCache are too expensive for me at this point. I did read about Alachisoft's NCache just before writing this post, so I'm looking into that soon. Any advice if the Express edition (free) would be of any help with this setup?
Everything appears to be working. When navigating to the designated loadbalancing IP-adress, the site works. When I modify something on guest0, it appears on the website shown by guest1. I haven't got a clue how this will run in a production environment though. Shouldn't it work, it won't be that much of a deal to revert back to a single-host setup.
Any advice on this setup would be greatly appreciated.