question

SatheeshkumarThirugnanam-4740 avatar image
0 Votes"
SatheeshkumarThirugnanam-4740 asked Bruce-SqlWork answered

Question on ASP.NET SQL Server Session clustering with external load balancer (BIG F5)

Our Current Setup
We have 4 IIS Servers where our ASP .NET application has been deployed.
In IIS, the session state is configured as SQL Server (External )
All the 4 IIS servers are configured as active pool members in the BIG F5 load balancer
On a normal scenario/traffic, we could see almost equal number of connections established across all the 4 members of the big F5 pool.

Problem Statement
If there is an issue with one of the IIS servers, we disable that server from the F5 pool. Even after disabling we don't see the connections are going down in the F5 pool.
Now we will restart that IIS server and the strange thing we have noticed during the restart is: the TCP active connections in the other active servers in the big F5 is drastically increasing (nearly 10 times) and at the same time the CPUs reached out to 100% in all those 3 active servers.
We would need your help to find out what would have caused this issue or if anyone else come across this scenario before.

.NET Framework Version: 4.6
IIS Version: 8.5.9600.16384
SQL Server Version: MS SQL 2016 SP2

Load Balance Algorithm: Round robin
Is the IIS server up and running before adding to the pool? Yes
Any server affinity? SQL Server session management

windows-server-iisdotnet-aspnet-core-general
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

In IIS, the session state is configured as SQL Server (External )

Are you using the distributed SQL Server cache to store the Session state?

Distributed SQL Server Cache
https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-6.0#distributed-sql-server-cache

If so, what does "In IIS" mean?

0 Votes 0 ·

Internet Information Services (IIS) is a web server where the ASP.NET application deployed and session state is configured as SQL Server. And we are not using distributed SQL server cache.

0 Votes 0 ·

In my opinion, this is related with the F5 load balancer and its feature. I suggest you could also ask F5's supporter to check this things.

0 Votes 0 ·
Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

not sure what sqlserver session has to do with the question. sql session is an outgoing connection, and should be a separate vip address.

are you sure the you add the IIS server to the pool, you are not adding a loopback (vip address instead of the server address)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SatheeshkumarThirugnanam-4740 avatar image
0 Votes"
SatheeshkumarThirugnanam-4740 answered

Yes, Its the IIS server which we are adding back into pool. There are no server affinity setup on the F5 side

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

you bigip is setup as follows

 Virtual server (load balancer ipaddress)
      pool name
            host1 - ipaddress of server 1
            host2 - ipaddress of server 2
            host3 - ipaddress of server 3
            host4 - ipaddress of server 4

when you remove say server4 from the pool, the round robin send no more request to server 4

when you add server4 back to the pool, it will get every 4th request. assuming your connections are short lived, the connections should balance.

the behavior you are describing sound like when server4 is added back, it makes a bunch of requests to the virtual server, or triggers some client to it.

you should use a network trace to determine the source of the traffic.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.