Steve; thanks a bunch for your feedback. Well we're so far looking into
getting the backend queries to perform faster so to get from 45s down
to somewhere < 10s, but we will see how this works.
However, in order to track it down, we did some "low-level" (?)
experiments: Simple dummy resource exposing a single method (see below)
that waits before returning a result, and then we fired two requests
more or less simultaneously (curl in two different terminal windows) at
the server.
Expectation would have been that all these requests take a while but
then see responses more or less the same time.
Actual behaviour is that the request 2 takes "twice" as long as the
request 1 to finish, which looks like request 2 actually is processed
only after request 1 finished. Logfile entries for these requests seem
to prove that.
I feel a bit dump for asking this but so far our expectations in Java
servlet environments was that there's a thread created (or taken from a
pool) to process each request. The behaviour we see here is somewhat
different.
Do we get something completely wrong here about how these things should
work? Is there anything fundamental we miss here? We also played with
acceptorThreads and selectorThreads and various configuration aspects
in dropwizard but that doesn't seem to change anything....
TIA and all the best,
Kristian
@Path("/dummy")
@Api(value = "dummy")
public class DummyResource {
public DummyResource() {
}
@GET
@Path("")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "dummy")
@ApiResponses({@ApiResponse(code = 200, message = "dummy")})
public String dummy() {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "dummy";
}
}
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.