Hey Rajesh,

There are many contributors to latency depending on the variables that we 
observe.  *time_starttransfer* <https://curl.haxx.se/docs/manpage.html#-w> 
for instance, is defined as:

> The time, in seconds, it took from the start until the first byte was just 
> about to be transferred. This includes *time_pretransfer* and also the 
> time the server needed to calculate the result.


It thus includes all the time up until the when your endpoint service sends 
its response.  Assuming your curl *time_starttransfer* examples correlate 
to the endpoint log entries, it would seem the majority of the time is 
spent sending and routing the request in this case from the GCE instance to 
the endpoint handler.  While there may be many steps and intermediate 
devices between the each instance, several seconds is generally a somewhat 
high latency.

There aren't any issues presently <https://status.cloud.google.com/> with 
Compute Engine networking or Endpoints.  If you believe this to be an issue 
with the platform, I would recommend filing a public issue on Issue Tracker 
<https://issuetracker.google.com/issues/new> as this forum is generally 
reserved for sharing best practices and design concepts.  When reporting an 
issue, be sure to include a minimal reproduction that can reliably 
demonstrate the latency you describe along with a time frame for when 
you've been able to reproduce these results.

On Tuesday, May 23, 2017 at 3:07:16 AM UTC-4, Rajesh Gupta wrote:
>
> Hello Team,
>
> Java Appengine zone: *asia-southeast1-a*
>
> I have Java standard appengine app running  with a simple endpoints api.
>
> Also, I have compute engine instance ubuntu created in the same time zone: 
> *asia-southeast1-a. 
>  *By doing this, I was expecting that curl client should get a very quick 
> response with out much latency, as the curl client and server are both 
> running in the same Google data center in the same zone.
>
> I run the curl for testing the endpoints api.  Many times, I get a very 
> huge latency. 
>
> Curl timings: Why the 'time_starttransfer' is so high and varying.  
>
> rajesh_gupta@instance-3:~$ curl -w "@curl-format.txt" -o NUL -s --data 
> "[email protected]&password=123456&count=2" 
> https://field-works1.appspot.com/_ah/api/vsloginendpoint/v2/vsLoginIonic2time_namelookup:
>  
> 0.004 time_connect: 0.009 time_appconnect: 0.110 time_pretransfer: 0.110 
> time_redirect: 0.000 time_starttransfer: 1.059 ---------- time_total: 
> 1.060rajesh_gupta@instance-3:~$ curl -w "@curl-format.txt" -o NUL -s 
> --data "[email protected]&password=123456&count=2" 
> https://field-works1.appspot.com/_ah/api/vsloginendpoint/v2/vsLoginIonic2time_namelookup:
>  
> 0.004 time_connect: 0.005 time_appconnect: 0.109 time_pretransfer: 0.109 
> time_redirect: 0.000 time_starttransfer: 14.565 ---------- time_total: 
> 14.565rajesh_gupta@instance-3:~$ curl -w "@curl-format.txt" -o NUL -s 
> --data "[email protected]&password=123456&count=2" 
> https://field-works1.appspot.com/_ah/api/vsloginendpoint/v2/vsLoginIonic2time_namelookup:
>  
> 0.004 time_connect: 0.005 time_appconnect: 0.102 time_pretransfer: 0.102 
> time_redirect: 0.000 time_starttransfer: 4.132 ---------- time_total: 
> 4.132rajesh_gupta@instance-3:~$ curl -w "@curl-format.txt" -o NUL -s 
> --data "[email protected]&password=123456&count=2" 
> https://field-works1.appspot.com/_ah/api/vsloginendpoint/v2/vsLoginIonic2time_namelookup:
>  
> 0.004 time_connect: 0.005 time_appconnect: 0.106 time_pretransfer: 0.106 
> time_redirect: 0.000 time_starttransfer: 3.930 ---------- time_total: 
> 3.930
>
> Sample Appengine Logs: 
>
> [image: Inline image 1]
>
> Regards,
> Rajesh
> *www.VeersoftSolutions.com <http://www.VeersoftSolutions.com>*
> *www.GainERP.com <https://www.gainerp.com>*
> *Accounting/Inventory/Orders/Sales/Purchase on Google Cloud Platform and 
> Mobile*
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/f12db071-363a-4f5a-96f5-d91f08246ac1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to