API Request Throttling: A Better Option
This past week there's been some interesting commentary regarding Twitter's change to its API request throttling feature. Request throttling, often used as a method to ensure QoS (Quality of Service)...
Published Jun 30, 2008
Version 1.0Lori_MacVittie
Employee
Joined October 17, 2006
Lori_MacVittie
Employee
Joined October 17, 2006
Lori_MacVittie
Jan 16, 2009Employee
Michael,
Sorry for the delay. I'm not an expert in optimizing iRules like some of the guys here on DC so I went to the guys who know best.
Here's what they said:
1) [HTTP::uri] contains "jspa": Contains is a relatively expensive matching function. If the path match can be made exact (equals), it is much more efficient.
2) The throttle related keys are set by the client IP address. If users are being NAT'd, this could cause problems. It would be safer to parse some sort of unique user ID from a cookie or query parameter.
3) Entries are only added to the session table. Entries are never deleted. If you have a very large number of client IP addresses coming in, you will fill up the memory. One should add the optional timeout value to the session add commands.
Hope that helps, and no problem on the help - that's what I'm here for!