I am using Google geocoding API service with their Java client, and my dev Key, The problem is when I run up to 40 requests it does slow to 600ms. I am using it in a webservice that is supposed to run faster than that. How can I speed things? I already set up the QPS (queries per second) in my code but it doesn't improve performance.

GeoApiContext context = new GeoApiContext().setApiKey("AI....");
GeocodingResult[] results =  GeocodingApi.geocode(context,Adresse).await();

What do you suggest to improve the performance?

  • 3
    40 geocoding requests per second is a lot, I would say 600ms for that volume is actually very fast. Perhaps you should adjust your expectation, particularly as you have no control over the service itself. Do you really need to do so many requests so quickly? Could you perform the requests incrementally? Apr 11, 2017 at 9:38
  • actually with the latest tests i found that it consume 5000ms ! and yes i need a fast response cuz i will be using it in a webservice that will be called a by the public
    – Zeus
    Apr 11, 2017 at 13:14

1 Answer 1


we could speed up the requests to Google API by network tweaking : separate route to Google (remove filtering and DPI rule on the firewall for that specific route). From 550-600 to 350ms. Some days we don't know why we can reach and keep an average of 150ms. But I assume this is all in the hands of Google then ... But as the comment says 600ms is not so bad already. NB : The next plan we studied if we need more speed would be to take a VM on GoogleCloud (kubernetes or appEngine) and fetch the results from there. But it requires some OPS skills (especially kubernetes) and a GoogleCloud account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.