cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: How to limit concurrent requests served by resource?
Date Fri, 22 Jan 2016 17:04:13 GMT
I might have some time to look at
https://issues.apache.org/jira/browse/CXF-6610

before 3.1.5 gets released if not then we will do for 3.1.6

It should be a very basic update, say if an optional property 
"abortWhenThresholdIsReached" is set then a specific exception is 
thrown, and either JAXWS or JAXRS mappers can then map it to 503

Sergey
On 18/01/16 11:08, Sergey Beryozkin wrote:
> Hi,
> jaxrs:server can have features or native CXF interceptors registered
> within jaxrs:features and jaxrs:inInterceptors (or
> jaxrs:outInterceptors), so that demo should work the same way with JAXRS
> servers it works with JAXWS.
> Unfortunately I haven't experimented much myself yet, though as I said
> one thing we noticed that supporting optionally returning 503 instead of
> suspending the overflowing client requests will be needed - that should
> be not be difficult to do.
>
> Cheers, Sergey
>
> On 18/01/16 10:54, Vjacheslav V. Borisov wrote:
>> Sergey, how should we adopt this approach to jax-rs services?
>>
>> Which is there jax-rs analogs to  AbstractPhaseInterceptor<Message> ?
>>
>>
>> 2016-01-15 16:19 GMT+04:00 Sergey Beryozkin <sberyozkin@gmail.com>:
>>
>>> Hi
>>>
>>> CXF ships its own throttling feature, Dan did it, see
>>>
>>>
>>> https://fisheye6.atlassian.com/browse/cxf/distribution/src/main/release/samples/throttling
>>>
>>>
>>> The threads will be temporarily suspended If the threshold is reached.
>>> One thing that still needs to be done is to support actually
>>> returning 503
>>> (if preferred) as opposed to suspending the clients.
>>>
>>> Sergey
>>>
>>>
>>> On 15/01/16 11:12, Vjacheslav V. Borisov wrote:
>>>
>>>> Hi,
>>>>
>>>> How to  limit concurrent requests served by specific resource, or by
>>>> application iteself?
>>>>
>>>> Found this thread
>>>>
>>>> http://stackoverflow.com/questions/5563442/how-to-set-limit-to-the-number-of-concurrent-request-in-servlet
>>>>
>>>>
>>>> Should i do something like showed in accepted answer,
>>>> or cxf has his  limit configuration ?
>>>>
>>>>
>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Mime
View raw message