Hello Robert,

I've added an issue for that question with a few line for analysis:
This issue concerns the internal HTTP server connector which can be used
for development, but not for production.

You can use the Jetty and Simple connectors which are right choices for
production environments.

Best regards,
Thierry Boileau

2014-08-06 6:17 GMT+02:00 Robert Barnett <barn...@rice.edu>:

> I had a very strange latency issue pop up today which I have isolated to
> an apparent issue with 2.2.1.  I can take the "Hello World" stand alone
> example from Restlet.com and modify the Resource to be:
> package firstSteps;
> import org.restlet.resource.Get;
> import org.restlet.resource.ServerResource;
> public class HelloWorldResource extends ServerResource {
>     @Get
>     public String represent() throws InterruptedException
>     {
>         System.out.println(Thread.currentThread().getId());
>         Thread.sleep(10000);
>         return "hello, world";
>     }
> }
> I then take two browsers, Firefox and Chrome, and make a request from
> each.  Firefox shows Hello World after 10 seconds and Chrome after 20.
>  Looking at the console I see that both requests were serviced by the same
> thread.  I can the take my load generator, jMeter, and send a lot of
> requests in parallel to Restlet.  Restlet processes them one at a time and
> always with the same thread. It is as if the default thread pool size is
> one. When I downgrade to 2.1 and run the same tests, the issue goes away
> with a variety of threads servicing the requests in parallel.
> Please advise.
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3086285


Reply via email to