You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by sandarenu <sa...@gmail.com> on 2014/10/02 18:25:22 UTC

Configure DoSFilter in CXF Jetty Transport

Hi all,

I've a REST server developed using CXF and it uses Jetty Transport. I've
configured it with a thread-pool. During high load, response time become
very high since jetty accepts all incoming requests. Is there a way to
configure CXF to reject connections (at TCP level) once max number of
connections are reached.

In jetty there is a DoSFilter, which is capable of doing above requirement.
But I'm not sure how to integrate that with CXF. I'm using Spring to setup
the CXF.




--
View this message in context: http://cxf.547215.n5.nabble.com/Configure-DoSFilter-in-CXF-Jetty-Transport-tp5749395.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Configure DoSFilter in CXF Jetty Transport

Posted by Jason Pell <ja...@pellcorp.com>.
Hi,

I added a sample of adding a servlet handler to jetty to my github project:

https://github.com/pellcorp/cxf/blob/master/JavaFirst/src/main/resources/META-INF/applicationContext.xml

Look for <httpj:handlers> <bean class=
"org.eclipse.jetty.servlet.ServletContextHandler">

Check out the filters, servlets, filter mappings, servlet mappings.

Not sure if this is the best way to do it, but it certainly works well.


On Thu, Oct 9, 2014 at 7:49 PM, Jason Pell <ja...@pellcorp.com> wrote:

> You can configure jetty handlers directly.  I have even configured some
> spring security jee filters this way. If I have a chance I will hunt up an
> example and post it
> On 03/10/2014 2:26 AM, "sandarenu" <sa...@gmail.com> wrote:
>
>> Hi all,
>>
>> I've a REST server developed using CXF and it uses Jetty Transport. I've
>> configured it with a thread-pool. During high load, response time become
>> very high since jetty accepts all incoming requests. Is there a way to
>> configure CXF to reject connections (at TCP level) once max number of
>> connections are reached.
>>
>> In jetty there is a DoSFilter, which is capable of doing above
>> requirement.
>> But I'm not sure how to integrate that with CXF. I'm using Spring to setup
>> the CXF.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/Configure-DoSFilter-in-CXF-Jetty-Transport-tp5749395.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>

Re: Configure DoSFilter in CXF Jetty Transport

Posted by Jason Pell <ja...@pellcorp.com>.
You can configure jetty handlers directly.  I have even configured some
spring security jee filters this way. If I have a chance I will hunt up an
example and post it
On 03/10/2014 2:26 AM, "sandarenu" <sa...@gmail.com> wrote:

> Hi all,
>
> I've a REST server developed using CXF and it uses Jetty Transport. I've
> configured it with a thread-pool. During high load, response time become
> very high since jetty accepts all incoming requests. Is there a way to
> configure CXF to reject connections (at TCP level) once max number of
> connections are reached.
>
> In jetty there is a DoSFilter, which is capable of doing above requirement.
> But I'm not sure how to integrate that with CXF. I'm using Spring to setup
> the CXF.
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Configure-DoSFilter-in-CXF-Jetty-Transport-tp5749395.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>