Forum Discussion
Mike_S_59924
Nimbostratus
Nov 15, 2008dealing w/ heavy load via try again later site
We would like to setup up two nodes in a pool as follows.
All traffic goes to node 1 until there there are 500 connections.
After that traffic goes to node 2 which is a site that just says try again later.
Once a user gets to node 1, we want them to stay there.
Once node 1 clears up a bit, new users get back to node 1.
This is a legacy site and load balancing is not an option. It is running a black box piece of software so getting into its bowels and having it tell uers to come back later is not an option either.
Thanks in advance.
- hwidjaja_37598
Altostratus
Try this:when RULE_INIT { set ::MaxConn 500 set ::CurConn 0 set ::RejectList [list / .html .htm .asp .pl ] } when CLIENT_ACCEPTED { incr ::CurConn } when CLIENT_CLOSED { incr ::CurConn -1 } when HTTP_REQUEST { if { ($::CurConn > $::MaxConn) and \ ([matchclass [HTTP::path] ends_with $::RejectList]) \ } { HTTP::respond 200 content " Please Try again later Please Try again later " drop } }
- Mike_S_59924
Nimbostratus
Thanks Humphrey, this is great. I'm sure the user is going to ask about a better "come back late page, branded w/ the graphics of the site, etc." Is there a way to redirect to another node? - Mike_S_59924
Nimbostratus
Thanks again Humphrey!!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects