2
votes

I have three tiered .NET web-application with F5 load balancer (sticky sessions) in front of the web tier (total of 4 web-servers) and another load F5 load balancer (sticky sessions) between the web-tier and the application tier (total of 4 applications servers). The underlying database is clustered.

Questions

By using a load balancer between the web-tier and the application tier, is this the only way to manage session state?

If you were to use only a F5 load balancer in front of the web-tier, what mechanism would use to handle session state to the application tier?

1

1 Answers

2
votes

You can use 2 standard options for session state management if you don't want to use sticky sessions on a load-balancer level.

See msdn Session-state

Configure your applications with the State Server Mode, you can configure one server to run the session state service, and all applications are configured to point to that server. So the state is stored in memory on one server.

 <configuration>
  <system.web>
    <sessionState mode="StateServer"
      stateConnectionString="tcpip=SampleStateServer:42424"
      cookieless="false"
      timeout="20"/>
  </system.web>
</configuration>

The other option is to configure your applications with the SQL Server Mode. The state is stored in a SQL database. This is the safest option, since the session state is persisted.

<configuration>
  <system.web>
    <sessionState mode="SQLServer"
      sqlConnectionString="Integrated Security=SSPI;data 
        source=SampleSqlServer;" />
  </system.web>
</configuration>