# http throttle BEFORE reverse proxy/ NAT?

**URL:** <https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [October 10, 2011, 2:13pm UTC](https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657 "2011-10-10T14:13:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pds\_71160](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@pds\_71160](https://community.f5.com/u/pds_71160)\
**Post date:** [October 10, 2011, 2:13pm UTC](https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657/1 "2011-10-10T14:13:20Z")

</div>

Would an http throttle iRule have priority (be executed before) reverse proxy or NAT configuration?

thanks!

---

<div class="post-metadata">

**Author:** ![nitass](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nitass/32/2270_2.png) [@nitass](https://community.f5.com/u/nitass)\
**Post date:** [October 10, 2011, 2:53pm UTC](https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657/2 "2011-10-10T14:53:12Z")

</div>

not sure if this is what you are looking for.

sol9038: The order of precedence for local traffic object listeners

> **[404 Page not found | BIG-IP Documentation](https://techdocs.f5.com/kb/en-us/solutions/public/9000/000/sol9038.html)**
>
> Usage information and technical documentation for BIG-IP and other related F5 products

if not, could you please explain a little bit more?

---

<div class="post-metadata">

**Author:** ![pds\_71160](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@pds\_71160](https://community.f5.com/u/pds_71160)\
**Post date:** [October 11, 2011, 8:32am UTC](https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657/3 "2011-10-11T08:32:32Z")

</div>

Hello,

we are trying to limit traffic from clients who could issue too many requests in too short of a time.

But we are not sure how an iRule script doing this limiting would interact with a reverse proxy for example.

---

<div class="post-metadata">

**Author:** ![Michael\_Yates](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@Michael\_Yates](https://community.f5.com/u/Michael_Yates)\
**Post date:** [October 11, 2011, 6:43pm UTC](https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657/4 "2011-10-11T18:43:56Z")

</div>

Hi PDS,

I believe that an iRule like this is what you are asking for: [http://devcentral.f5.com/wiki/iRules.HTTPRequestThrottle.ashx](http://devcentral.f5.com/wiki/iRules.HTTPRequestThrottle.ashx)

To answer your question about how the limiting would interact with a reverse proxy… It would depend on your setup. If you have multiple users that are NAT’ed into a single IP Address then you would need to engage something like a OneConnect profile to insure that each TCP Connection was treated as an individual user, so that subsequent requests would not get throttled (treating new users as requests as requests from an “existing” user). If you did that then it would limit the behavior of the iRule to that TCP Connect / Individual Client.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [October 11, 2011, 6:58pm UTC](https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657/5 "2011-10-11T18:58:24Z")

</div>

I think PDS is asking if the throttling could be done before TMM translates the client IP to its own source IP. If that’s the question, yes, you can throttle based on the original client IP. If you’re throttling based on layer 4 connections you can use [IP::client\_addr] to get the client IP in the CLIENT\_ACCEPTED event. For HTTP request based throttling, you can throttle in the HTTP\_REQUEST event.

[http://devcentral.f5.com/wiki/iRules.client\_accepted.ashx](http://devcentral.f5.com/wiki/iRules.client%5C_accepted.ashx)

[http://devcentral.f5.com/wiki/iRules.http\_request.ashx](http://devcentral.f5.com/wiki/iRules.http%5C_request.ashx)

[http://devcentral.f5.com/wiki/iRules.ip\_\_client\_addr.ashx](http://devcentral.f5.com/wiki/iRules.ip%5C_%5C_client%5C_addr.ashx)

Aaron

---

<div class="post-metadata">

**Author:** ![pds\_71160](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@pds\_71160](https://community.f5.com/u/pds_71160)\
**Post date:** [October 12, 2011, 8:27am UTC](https://community.f5.com/t/http-throttle-before-reverse-proxy-nat/36657/6 "2011-10-12T08:27:16Z")

</div>

ok, fantastic, I’ve got all I need!
