java - Big spikes in Google App Engine caused by idle time between internal GAE calls -
we have api googe app engine. process follows. have 2 calls datastore objetify , call urlfetch (to external api).
in many of request see response takes long because there empty time spaces between datastore call , urlfetch call. times empty time after calls, before , in between. may have spikes of 10s.
example when idle time between calls: 
example when idle time before calls: 
this current configuration:
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>${appengine.web.application}</application> <version>1</version> <threadsafe>true</threadsafe> <module>default</module> <instance-class>f4_1g</instance-class> <automatic-scaling> <min-idle-instances>3</min-idle-instances> <max-idle-instances>automatic</max-idle-instances> <min-pending-latency>30ms</min-pending-latency> <max-pending-latency>automatic</max-pending-latency> </automatic-scaling> <system-properties> <property name="java.util.logging.config.file" value="web-inf/logging.properties"/> </system-properties> </appengine-web-app> this not happens every time makes request our api, time time. our average request time 600ms. also, don't make other operation in between calls.
is idle time happening because gae not scale properly?
[edit]
i did new tests try understand why i'm getting high latency. did 2 tests, 1 smallest machine (f1) , other biggest 1 (f4_1g). code consist on 2 datastore calls , urlfetch external api.
results f1 instance: 
results f4_1g instance: 
as you'll see there high latency requests in machine f1 while in other machine goes expected. high latency request has idle time between calls in first question. assume f1 instance got out of memory because it's smaller , doing many requests. have 3 questions:
1) of machines should generate these high latency. when instance overloaded, gae should start new instance or make use of idle instances. correct or missing something???
2) reason gae not scale correctly? (i hope not because gae complete failure). need change configuration?
3) solved problem using biggest machine. should when f4_1g machine gets latency? there no bigger machine.
Comments
Post a Comment