-
Notifications
You must be signed in to change notification settings - Fork 16
/
toobusy.node.txt
11 lines (8 loc) · 1.53 KB
/
toobusy.node.txt
1
2
3
4
5
6
7
8
9
10
11
TOOBUSY
TOOBUSY() #Returns true if request queue is too long, i.e. TOOBUSY.maxLag(NUM) (def: 70ms)
#Goal is to send 503 error messages if it's the case. Otherwise, in high traffic, it would just
#keep growing and last requests will never get a chance to be served.
#Should be used in an EXPRESS MIDWR as if ( TOOBUSY() ) { send 503 } else { next() }
#Version 0.2.4