1

I have an API (built with nodejs) and deployed on a kubernetes cluster using a docker image.

For default route I simply return a Hello World QA! message.

I am testing response times of this GET request and I see that once in a while, randomly, one of the requests takes MUCH longer than others, eg:

Cristians-MBP:google_cloud cristiboariu$ curl -X  GET "http://35.230.22.104:8000" -w "@curl-format.txt" -s
Hello World QA!time_namelookup:  0.005095
       time_connect:  0.203066
    time_appconnect:  0.000000
   time_pretransfer:  0.203164
      time_redirect:  0.000000
 time_starttransfer:  0.420915
                    ----------
         time_total:  0.421004
Cristians-MBP:google_cloud cristiboariu$ curl -X  GET "http://35.230.22.104:8000" -w "@curl-format.txt" -s
Hello World QA!time_namelookup:  0.005164
       time_connect:  0.236487
    time_appconnect:  0.000000
   time_pretransfer:  0.236551
      time_redirect:  0.000000
 time_starttransfer:  0.449582
                    ----------
         time_total:  0.449632
Cristians-MBP:google_cloud cristiboariu$ curl -X  GET "http://35.230.22.104:8000" -w "@curl-format.txt" -s
Hello World QA!time_namelookup:  0.005092
       time_connect:  0.214788
    time_appconnect:  0.000000
   time_pretransfer:  0.214851
      time_redirect:  0.000000
 time_starttransfer:  0.419028
                    ----------
         time_total:  0.419075
Cristians-MBP:google_cloud cristiboariu$ curl -X  GET "http://35.230.22.104:8000" -w "@curl-format.txt" -s
Hello World QA!time_namelookup:  0.005099
       time_connect:  1.009918
    time_appconnect:  0.000000
   time_pretransfer:  1.009983
      time_redirect:  0.000000
 time_starttransfer:  3.137044
                    ----------
         time_total:  3.137087

This happens for ANY endpoint hosted here. I simply don't know what can be the cause. Can anybody help please?

  • Are all of the cluster nodes in the same region? Are they all the same spec. Do these servers sit behind anything more than the default K8 LB? – Harry Traynor Sep 7 '18 at 13:09

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.