Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Rest API With Jersey and Java8 on google app engine slow

Hi,

 

I'm working on a Java8 application on Google App Engine. The application offers an API powered by Jersey as a Servlet Container (version 2.38) and Spring for IOC. The application is deployed on a F2 instance.

 

I'm facing some performance issue.
After a warmup, a long inactivity or for some unknown reason, some HTTP Request made to the API can taken few second instead of few ms.

 

The warmup operation initialized the Spring context and the Jersey Servlet Container as expected. But in any case, the Jersey response is still slow for the first Request. 

 

After some investigation, it seems that Jersey took a while to call my controller. Jersey found the Controller annotated with @Path() without problem and quickly. But it took a while to invoke the controller.

 

I would like to know if there is a specific configuration to apply for spring or Jersey in a Google App engine environment ?
 
Thanks a lot.
0 1 190
1 REPLY 1

Hi @sc-mca

I would suggest reaching Google Cloud Support regarding this matter as they can easily investigate and look into your project to check what is happening on your slowness of your request.

Regards,