Skip to main content
This may be down to my lack of knowledge of load balancing, but if we have a number of clients that communicate to a K2 Server via .NET application communicating to K2 via K2ROM calls if we add another K2 server in order to load balance. How is load balacing achieved by these K2ROM calls. i.e we connect to K2ROM by setting a k2servername, port, etc. If we add another K2 Server I guess this will point to the same K2 DB but have a different k2 servername, therefore how can load balancing be achieved in this case?
How is load balancing achieved by these K2ROM calls. i.e we connect to K2ROM by setting a k2servername, port, etc.

Short answer: use the NLB node name as the K2ServerName in the connection string. Everything else remains the same as a normal connection to a single K2.net server.

More detail:
Typically, you may have multiple K2 servers in one NLB node. This NLB node appears as a logical machine on the network. When you connect using K2Rom, you would then use the NLB node name as the server name - the underlying NLB technology will then assign the call to one of the NLB node member physical machines. A good approach would be to use a central configuration to specify the servername that will be used to establish the K2ROM connection, so that you can update the servername to the new NLB node name when the time comes.

You are correct in saying that the K2 servers will use the same database. In practice, the servers will share processing load between themselves. A single process instance, for example, may execute on any of the servers since the K2.net server service is stateless. This implies that if one server fails, the other can take over processing of all running processes (within certain limits, but a discussion on these is outside of scope here)

HTH

Reply