Conversation
if you have `origin_max_connections` set, it will limit the number of sessions sent to a given origin. Once the limit is hit ATS would infinitely queue requests waiting for the origin to respond. In the event that the origin is broken (and will stay so) it is better to error the pages, on the flip side if you want ATS to just limit the number of connections you don't want to just close the connections. To handle both of these I've introduced `origin_max_connections_queue`. This option limits the number of outstanding connections allowed to a given origin. A value <0 defaults to the old behavior (no limits). If set to 0 all requests past the limit are errored, and if the limit is >0 then that many requests are allowed to be outstanding to the origin. This closes apache#564
|
This isn't complete yet, still need to add handling for timeouts etc., but I wanted to get the PR opened to get some eyes on it :) |
|
👀 I'm on it. |
if you have `origin_max_connections` set, it will limit the number of sessions sent to a given origin. Once the limit is hit ATS would infinitely queue requests waiting for the origin to respond. In the event that the origin is broken (and will stay so) it is better to error the pages, on the flip side if you want ATS to just limit the number of connections you don't want to just close the connections. To handle both of these I've introduced `origin_max_connections_queue`. This option limits the number of outstanding connections allowed to a given origin. A value <0 defaults to the old behavior (no limits). If set to 0 all requests past the limit are errored, and if the limit is >0 then that many requests are allowed to be outstanding to the origin. This closes apache#564
|
Well, it seems that this doesn't leak in the queue-- but I did find another bug (https://issues.apache.org/jira/browse/TS-4343) which we'll probably want to fix at the same time as this :/ |
c68064c to
4b9c30f
Compare
if you have `origin_max_connections` set, it will limit the number of sessions sent to a given origin. Once the limit is hit ATS would infinitely queue requests waiting for the origin to respond. In the event that the origin is broken (and will stay so) it is better to error the pages, on the flip side if you want ATS to just limit the number of connections you don't want to just close the connections. To handle both of these I've introduced `origin_max_connections_queue`. This option limits the number of outstanding connections allowed to a given origin. A value <0 defaults to the old behavior (no limits). If set to 0 all requests past the limit are errored, and if the limit is >0 then that many requests are allowed to be outstanding to the origin. This closes apache#564
if you have `origin_max_connections` set, it will limit the number of sessions sent to a given origin. Once the limit is hit ATS would infinitely queue requests waiting for the origin to respond. In the event that the origin is broken (and will stay so) it is better to error the pages, on the flip side if you want ATS to just limit the number of connections you don't want to just close the connections. To handle both of these I've introduced `origin_max_connections_queue`. This option limits the number of outstanding connections allowed to a given origin. A value <0 defaults to the old behavior (no limits). If set to 0 all requests past the limit are errored, and if the limit is >0 then that many requests are allowed to be outstanding to the origin. This closes apache#564
| } else if (ats_is_ip6(addr)) { | ||
| ink_code_md5(const_cast<uint8_t *>(ats_ip_addr8_cast(addr)), TS_IP6_SIZE, zret.c); | ||
| // now replace the bottom 16bits so we can account for the port. | ||
| zret.b[3] = ats_ip_port_cast(addr); |
There was a problem hiding this comment.
It seems that this returns nothing/garbage in the ipv6 case-- as both lines in ipv6 simply add to .b and .c, but the method only returns .i.
There was a problem hiding this comment.
That being said, it seems to do the same thing in ats_ip_hash, which also seems like it wouldn't work :/
There was a problem hiding this comment.
zret is a union; it's the same data.
There was a problem hiding this comment.
@jpeach thanks for calling out my stupid, for whatever reason I read it as struct ;) So nevermind then-- we are all set :)
|
@jacksontj I'm going to merge my pull request, can you please update yours once my code lands? Thanks |
if you have `origin_max_connections` set, it will limit the number of sessions sent to a given origin. Once the limit is hit ATS would infinitely queue requests waiting for the origin to respond. In the event that the origin is broken (and will stay so) it is better to error the pages, on the flip side if you want ATS to just limit the number of connections you don't want to just close the connections. To handle both of these I've introduced `origin_max_connections_queue`. This option limits the number of outstanding connections allowed to a given origin. A value <0 defaults to the old behavior (no limits). If set to 0 all requests past the limit are errored, and if the limit is >0 then that many requests are allowed to be outstanding to the origin. This closes apache#564
if you have `origin_max_connections` set, it will limit the number of sessions sent to a given origin. Once the limit is hit ATS would infinitely queue requests waiting for the origin to respond. In the event that the origin is broken (and will stay so) it is better to error the pages, on the flip side if you want ATS to just limit the number of connections you don't want to just close the connections. To handle both of these I've introduced `origin_max_connections_queue`. This option limits the number of outstanding connections allowed to a given origin. A value <0 defaults to the old behavior (no limits). If set to 0 all requests past the limit are errored, and if the limit is >0 then that many requests are allowed to be outstanding to the origin. This closes apache#564
Cherrypick: Add SINK_TRANSFORM option to CPPAPI
TS-4341