Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Load Balancer

 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a lot of deployments there are two HTTP servers to prevent from there being a single point of failuer.
A load balancer then usually sits in front of the two HTTP servers.

Suppose I want session affinity and round robin. Do I configure this in my load balanacer or do I just configure the load balancer to forward to one http server and put the session affinity and round robin there. The other HTTP server would only kick in then if the primary one fails?
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session affinity can be configured at the load balancer. However if you are using a pure HTTP server like Apache, then session affinity will need to be configured at the HTTP server as the HTTP server will be forwarding the request to the web container.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I want session affinity and round robin.


Affinity and round robin are mutually exclusive.
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepak Bala wrote:
Suppose I want session affinity and round robin.

Affinity and round robin are mutually exclusive.


That depends on the flexibility of your load balancer.
Your can differ between the algorithms used based on the headers of the http request.
As such affinity and round robin are not mutually exclusive
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arnold Reuser wrote:
Deepak Bala wrote:
Suppose I want session affinity and round robin.

Affinity and round robin are mutually exclusive.


That depends on the flexibility of your load balancer.
Your can differ between the algorithms used based on the headers of the http request.
As such affinity and round robin are not mutually exclusive


They are.

What you are talking about is switching the load balancer's mode of operation between affinity and RR. I agree that this can be configured. However you cannot serve a request in affinity mode and then decide that you want to serve it in RR next time. Practically, it would not make sense
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would indeed make no sense to switch from affinity to RR mode.
Switching from RR to affinity would make sense and is also of practical use.
But, based on your remark, I think that was not the question asked.

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arnold Reuser wrote:It would indeed make no sense to switch from affinity to RR mode.
Switching from RR to affinity would make sense and is also of practical use.
But, based on your remark, I think that was not the question asked.



Yes we are discussing 2 different points. I perceived the 'and' in the initial question to mean configuring both at the same time

Suppose I want session affinity and round robin
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are not mutually exclusive.

You can configure round robin and session affinity in Apache HTTP Server.

Basically, every new client follows round robin, until they hit a server. Every existing client "sticks" to the server they are on.
This approach is also called sticky round robin...
http://download.oracle.com/docs/cd/E19823-01/819-0215/loadb.html#wp1027015

Cheers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic