Menu

Search

InstantASP Support

Help & Support


Configuring InstantForum For Load Balancing


Common Questions

For larger communities it's often helpful to load balance your InstantForum installation across multiple servers. InstantForum supports several features to help you easily load balance your community. This article details these features and offers some helpful tips to help you easily load balance your community.

Getting Started

Install InstantForum on each web server within your cluster. Ensure each installation uses exactly the same .NET version within your IIS application pools.

Central File Uploads

If you load balance InstantForum across 2 or more web servers you will want to ensure images & profile photos uploaded by users within your community are accessible from each load balanced instance. To achieve this InstantForum supports the ability for you to specify a central file server for all user uploads.

The file server must on the same LAN or VLAN as your web servers as InstantForum uses a UNC path to allow you to specify the file server.

To configure all uploads to be stored on a UNC share please follow the steps below...

  1. Open each InstantForum web.config file within your cluster. Locate the InstantASP_UploadPath application setting as shown below...

    <add key="InstantASP_UploadPath" value="" />
    

    Update this to point to your central file server. For example...

    <add key="InstantASP_UploadPath" value="\\<servername>\<foldername>\" />
    

    Where <servername> is the name or IP address of your file serve and <foldername> isthe name of the folder that contains the "Uploads" folder you'll copy across in step 2 below.

  2. Copy the "Uploads" folder from the root of your InstantForum installation into the \\<servername>\<foldername>\ folder.
  3. Delete the "Uploads" folder within each InstantForum installation. We will configure a virtual directory within IIS to replace this called "Uploads" that will point to the "Uploads" folder on your UNC path not within each InstantForum installation. This will ensure each installation of InstantForum can access the same user uploaded images or profile photos.
  4. Within IIS add a new virtual directory to each InstantForum installation. Call this new virtual directory "Uploads" and point this to the "Uploads" folder on your central file server.

Configuring Permissions For Central Uploads

When a user attempts to upload an image or profile photo each web server by default will attempt to write that file to disk using the windows account under which the application pool runs.

As these application pool windows accounts likely don't exist on the central file server you'll need to use impersonation to ensure your web applications can write to the remote UNC path. To achieve this please follow the steps below...

  1. On each web server create a new windows user. For this example lets call this new windows account "InstantForum User". Provide a strong password for this account and make a note of the password.
  2. On your file server create a new windows account with exactly the same username and password. Again in this example we would create a new windows user on the file server called InstantForum User and set the same password.
  3. Ensure the windows account you created on the file server (in this example InstantForum User) has write & modify permissions to the "Uploads" folder and all child folders you copied onto your file server.
  4. Open each InstantForum web.config file on your web servers and locate the impersonation element as shown below...

    <identity impersonate="false" userName="" password="" />
  5. Provide the username and password you created for the identical windows account you created on each web server and on your file server. For example...

    <identity impersonate="false" userName="InstantForum User" password="jd#8FjXu5rCkvCi9!4" />

Now when InstantForum attempts to write a user upload to the UNC path specified within the InstantASP_UploadPath application setting the file will be written to disk using the windows user account you specify within the impersonation element. As the InstantForum User we created has write & modify permissions on the Uploads folder we copied to the file server and all child folders uploads will work as normal.

Images will be served from your UNC path for each installation of InstantForum as you created a virtual directory called Uploads that points to your UNC share.

Persisting Authentication

To ensure user authentication between your web servers is persisted correctly you will need to ensure each InstantForum web.config file has identical <authentication> and <machineKey> elements. For further information please see InstantForum Single Sign On Considerations.

Ensuring a consistent <machineKey> and <authentication> element will ensure the client side forms authentication cookie used to persist user authentication can be read by each InstantForum installation.

Session State

InstantForum does not use in memory session state. All session state is centralized to the database to assist with load balancing scenarios.


Related Links



Optionally provide private feedback to help us improve this article...

Thank you for your feedback!


Comments require login or registration.

Details

Product: InstantForum
Version: All Versions
Type: HOWTO
Level: Novice
Rated 1 star based on 3 votes.
Article has been viewed 6K times.
Last Modified: Last Year
Last Modified By: Ryan Healey

Options

Similar Articles


Tags