Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the default configuration good in Jetty 8 sensible for quite heavily loaded web application?

Its been decided to deploy an application to Jetty 8, previously was using Tomcat 7. Jetty 8 is being used using the defaults, and seems to be working okay, but then occasionally waiting for connections, looking at the jetty.xml I'm confused about the interplay between threads and connectors.

But the general question is should the defaults work for a quite heavily loaded web application or are their obvious changes that need to be made ?

Update Let me try and me more specific about this.

In jetty.xml it says maxThreads=200 so it can in theory deal with 200 requests in parallel (more than we have to deal with) , but is there a rule of thumb about how much memory jetty should be configured with to go with this.

It also defines a SelectChannelConnector connector, I assume this is the thing that receives requests and farms them out to threads. is this connector the best performing one available to us ?

like image 832
Paul Taylor Avatar asked Oct 01 '12 06:10

Paul Taylor


People also ask

How do you set up a jetty?

Jetty POJO Configuration You can achieve this either by: Writing Java code to directly instantiate and assemble Jetty objects. This is referred to as Embedding Jetty. Using Jetty XML configuration, which is an Inversion of Control (IoC) framework, to instantiate and assemble Jetty objects as XML objects.

What is Jetty base?

Jetty is an open-source project providing an HTTP server, HTTP client, and javax. servlet container.


1 Answers

Yes, the defaults should be generally fine for what you describe. A quick tweak you can make is to set the number of acceptors to the number of cpu's you have. Aside from that you can always enable jmx and see how things look memory wise using jconsole to see something else might need to be tweaked.

We have some OS related things mentioned on this link as well:

http://wiki.eclipse.org/Jetty/Howto/High_Load

like image 124
jesse mcconnell Avatar answered Oct 06 '22 18:10

jesse mcconnell