Anecdotally I would say it's not uncommon. If you add in time spent making your first socket connection to a database, for instance, and other first-time costs that aren't paid on server startup, it stands to reason that the first request won't be snappy compared to subsequent requests.
As a workaround you could consider "warming" your service up with some synthetic traffic before making it live for user requests (or maybe you have other ways of pre-warming things). On Wed, Feb 7, 2018 at 2:05 PM tuk <[email protected]> wrote: > I am using dropwizard 1.0.2. I am observing the response time for the very > first request is about 5.5 seconds and then the subsequent request is > taking about 1 second. > > > The issue is something similar to the one discussed here > <https://stackoverflow.com/questions/48665778/dropwizard-response-time-is-slow-for-first-request> > . > > > Can some one let me know is this expected? If yes then is there a > workaround? > > > If this is not expected can some one let me know how can I log the timings > of various phases of request processing in dropwizard? > > > I have already verified the timings in my resource class (this is > returning the response in about 800 ms) > > -- > 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. > -- 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.
