> You can have a filter which increments the counter and records for  each
request  from the  user and kicks him/her when the limit is crossed.

We're actually interested in this problem from the other direction. When
making an outbound HTTP request we want to limit the number of times (or
the maximum duration of use) for a single connection. The idea is that we
want to re-use the connection for some time to amortise the cost of DNS and
TLS across multiple requests. However, there's a point at which we need to
snap the connection and start a new one to ensure that changes to DNS are
respected in a timely manner.

On Thu, Jul 6, 2017 at 7:34 AM <uwinsoi...@gmail.com> wrote:

> Hi there,
> You can have a filter which increments the counter and records for  each
> request  from the  user and kicks him/her when the limit is crossed. I do a
> similar type of check where in I check whether the user has a authenticated
> session at the point of time of for each request. I did this for a web app
> hosted on Tomcat server in java. Hope this idea may help for your situation.
> Regards
> Pavan
>
>
> On Tuesday, July 4, 2017 at 5:32:18 AM UTC+5:30, Mikhail Mazurskiy wrote:
>>
>> Hello there,
>>
>> Is there a way to limit the number of http requests a client will issue
>> via a single tcp connection? I cannot find anything relevant to this
>> question. Maybe a snippet of code to implement this...
>>
>> The use case is to force a highly active http connection to be closed
>> after certain number of requests and/or time period. It is actively used so
>> idle timeout will not work. I'd like it to be closed and re-established to
>> pick up DNS changes - start using new ips before the remote side closes the
>> connection. Trying to use weighted dns to progressively (in steps)
>> transition load from one group of servers to another group.
>>
>> Thanks in advance for any input.
>>
>> Cheers,
>> Mikhail.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to