Okay, after lot of testing and deployments I've found one weird issue - 
json deserialisation is slow when the app is under load. My microservice 
accepts a json oject through post (simple bean with 10 short text 
properties). I can see that deserialisation of the bean takes 3+ seconds 
when the app experiences spike in requests. If the app is under the load 
the latency of datastore/memcache also goes up significantly (2+ seconds 
for datastore and memcache is very common).

I just wonder why is it happening - I don't think that 20 simple post 
updates should cause such issues for app engine...

The json is just my wrapper around Gson/Jackson...

log.debug("Deserialising with {}", json);
Cast data = this.json.deserialise(c, value);
log.debug("Deserialised with {}", json);

20:55:06.893 [s~/1.400479083523705872].<stdout>: 2017-04-11 08:55:06 DEBUG 
StringToObjectConverter:32 - Deserialising with JacksonImpl@df29bb7
 20:55:11.389 [s~/1.400479083523705872].<stdout>: 2017-04-11 08:55:06 DEBUG 
StringToObjectConverter:34 - Deserialised with JacksonImpl@df29bb7


On Tuesday, 11 April 2017 04:38:40 UTC+12, George (Cloud Platform Support) 
wrote:
>
> Hello Thomas, 
>
> You may consider making use of the “Async Datastore API 
> <https://cloud.google.com/appengine/docs/standard/java/datastore/async>” 
> and dedicated memcache, as described in the “Memcache Overview” document 
> <https://cloud.google.com/appengine/docs/standard/java/memcache/>. 
>
> To investigate this issue properly, we need a minimum of information: 
>
> - What project are you speaking about, exactly?  
>
> - What is the general structure of your Java code? 
>
> - Does your Java application make use of thread synchronization? 
>
> - Is the application designed with easy scaling in mind? The “Designing 
> for Scale” document 
> <https://cloud.google.com/appengine/articles/scalability> provides 
> detailed advice in this respect. 
>
> - A timestamp for an example of slow performance for memcache or 
> datastore. 
>
> - A copy of the app.yaml would come quite handy. 
>
> - Any other piece of information you deem relevant to the issue, in excess 
> with what has been already provided. 
>
> You can send us confidential information, as requested above, by private 
> email, using the drop-down menu at the top right side of the message 
> window.  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b093fd4c-b3af-4e7e-aa48-2727152d1d2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to