[kwlug-disc] low tech traffic splitting

john at netdirect.ca john at netdirect.ca
Wed Feb 17 14:22:35 EST 2010


kwlug-disc-bounces at kwlug.org wrote on 02/17/2010 02:06:23 PM:
> 
> If we're trying to preplan for getting slashdotted on our webservers, 
> what's the best low tech way to handle that?  I've got two identical 
> webservers I can light up, but don't know how to share traffic, sync, 
> etc.  I suspect some type of clustering is the answer in linux these 
> days, but I don't even know what that really is :).

It depends on your web application and back-end infrastructure. You need 
to answer this question: can I have both web servers fully utilised by 
clients without any problems. If each web server has its own database on 
which users leave data, can you consolidate the databases? Do users get 
meaningful cookies? Can you share the cookie database?

Typically, for servers that are static, a round-robin DNS will be the 
simplest. Just add several A records for the same web site name. Put a 
suitably long Time-To-Live on the records so that clients can finish their 
business with the same server and you'll likely be okay. If one of the 
servers goes down then half your clients will get errors until the TTL 
runs out.

For servers or applications that require state tracking (think SSL, 
cookies, shopping cart, etc.) then an application level proxy or load 
balancer is required. This is free software that tracks each session and 
makes sure that the user is directed to the same server. This is used in 
combination with RR DNS. Load balancers monitor back-end servers so if one 
goes down requests are forwarded to a surviving server. Users on failed 
servers would have their session disappear, similar to a time out. For 
redundancy two load balancing servers are used and are clustered so that 
if one goes down, the other will take it's load.

Finally some back-end sharing of state is needed to ensure that if users 
are forced to another server their state is maintained, e.g. their 
shopping cart remains, etc.

We have done work with Red Hat Cluster Server which bundles all the free 
tools for managing load balancing and failover of load balancers. It also 
handles application failover.



John Van Ostrand
Net Direct Inc.
 
CTO, co-CEO
564 Weber St. N. Unit 12
map
 
Waterloo, ON N2L 5C6
 
john at netdirect.ca
Ph: 866-883-1172
ext.5102
Linux Solutions / IBM Hardware
Fx: 519-883-8533
 






More information about the kwlug-disc mailing list