Query speed exceeds 200ms

Hi there, My algolia results takes more than 200ms to be retrieved…even for small indexes… with 10 records
I am on community and this is weird…I expected to have a quicker response like promised, anything I am doing wrong??

Hi @bdairy08, have you been able top reproduce this with a curl command? can you share it with us?

Can u please tell me how ??

Hi @bdairy08,

You’re almost there and already in the right general location based on your screenshot. In the dev tools, locate the “Network” tab and find the query you believe is slow then navigate to “copy as cURL”:

You should also consider sharing with us your App ID and granting Algolia support access here: https://www.algolia.com/account/support

Thanks @ajay.david , my app ID 483SD6DNOD
The support access has been granted.
Curl is the following:

curl 'https://483sd6dnod-dsn.algolia.net/1/indexes/cities/query?x-algolia-agent=Algolia%20for%20JavaScript%20(3.35.1)%3B%20Browser&x-algolia-application-id=483SD6DNOD&x-algolia-api-key=ZTZkY2Y4NDU4ZGQxZjQ1Yjk3ZTFmOWM2NmRlODIwYzBhMzMxMjU4NjM5Y2Y1ZGYyNTk4MWI1MzE2YzI0ZWZmYXZhbGlkVW50aWw9MTU3NTU2NTIwNDM5OA%3D%3D' -H 'Connection: keep-alive' -H 'accept: application/json' -H 'Origin: https://iskani.com' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36' -H 'content-type: application/x-www-form-urlencoded' -H 'Sec-Fetch-Site: cross-site' -H 'Sec-Fetch-Mode: cors' -H 'Referer: https://iskani.com/' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9,ar;q=0.8,fr;q=0.7,ru;q=0.6' --data '{"params":"query=&aroundLatLngViaIP=true&getRankingInfo=true"}' --compressed

also to avoid ranking issue here is another curl without Ranking for location:

curl 'https://483sd6dnod-dsn.algolia.net/1/indexes/online_properties/query?x-algolia-agent=Algolia%20for%20JavaScript%20(3.35.1)%3B%20Browser&x-algolia-application-id=483SD6DNOD&x-algolia-api-key=ZTZkY2Y4NDU4ZGQxZjQ1Yjk3ZTFmOWM2NmRlODIwYzBhMzMxMjU4NjM5Y2Y1ZGYyNTk4MWI1MzE2YzI0ZWZmYXZhbGlkVW50aWw9MTU3NTU2NTIwNDM5OA%3D%3D' -H 'Connection: keep-alive' -H 'accept: application/json' -H 'Origin: https://iskani.com' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36' -H 'content-type: application/x-www-form-urlencoded' -H 'Sec-Fetch-Site: cross-site' -H 'Sec-Fetch-Mode: cors' -H 'Referer: https://iskani.com/' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9,ar;q=0.8,fr;q=0.7,ru;q=0.6' --data '{"params":"query=&filters=featured%3Atrue&page=0&hitsPerPage=3"}' --compressed

Thanks for the curl @bdairy08! When I ran the first one you shared I get the follow response:

{"hits”[…],”nbHits":12,"page":0,"nbPages":1,"hitsPerPage":20,"exhaustiveNbHits":true,"query":"","params":"query=&aroundLatLngViaIP=true&getRankingInfo=true&validUntil=1575565204398","aroundLatLng":"40.5447,-105.107","automaticRadius":"14520003","serverUsed":"c10-use-3.algolia.net","indexUsed":"cities","parsedQuery":"","timeoutCounts":false,"timeoutHits":false,"processingTimeMS":1}

Most notable is the processingTimeMS:1. This means that once the query hit the engine, it took just 1ms to process it. Can you confirm that this number appears similar for you?

Indeed, if I look in the monitoring tab of your dashboard (thanks for giving us personification access!) I can see that on average, queries for your application appear to take < 20 ms:

This means that the ~180ms you see for the request is largely caused by latency. Indeed, if I go to https://iskani.com/properties-search?type=1&page=0 and make a search, I can see that the complete query takes > 1ms:

But 70ms is a lot lower than 180ms. The first thing I would consider is where your cluster is located. Since you are doing a front-end implementation, it would be best to have your cluster closest to your end users (and possible yourself). It appears your cluster is currently located in US-East. If you’d like for us to move your application to another cluster I would recommend writing in to support@algolia.com. and linking this Discourse thread for context.

The options for location can be found here: https://www.algolia.com/doc/faq/basics/where-are-the-clusters-and-servers-located/.

Hope this helps!

1 Like

I agree with you about the execution time on the server . I’ll look into the cluster issue and come back to you. Thanks @maria.schreiber for the feedback. It sounds promising .

1 Like

@maria.schreiber normally how much time does it take for support to response?

Hi @bdairy08,

Our support team is online from 08:00 am to 01:00 am UTC 5 days a week. You usually get an answer during the day but it can take longer in case of exceptional load. We prioritise support request based on the support offering included in each plan level.

You can learn more about our support policy here: https://www.algolia.com/policies/support/

Did you send a support request to our team that we missed? Let us know and we’ll try to answer ASAP!
Thanks!

Thanks @marie.gillier I did send a request on the 7th of this month, and that was my email:

Dear,

            As per this conversation 

Query speed exceeds 200ms I would like to request a cluster location change. My app will run mostly in the middle east region… specially Jordan… I wonder which datacenter is more suitable to connect to. My app ID is 483SD6DNOD

Hope to hear from you soon.

Still no response… I hope you can speed things up… Thanks again

Thanks!
We did see your request this morning (as we do not work on Saturday and Sunday) and re-routed it to the correct team. You will get an answer soon!

Thanks @marie.gillier

@marie.gillier Thanks for your help, I received a reply from the support that I didn’t see it was in my junk,
anyway they moved my cluster to Germany, which closer, the performance is a lot better, but Yet I wonder if we can enhance that??

There is alway around 70 - 100 ms seconds waiting, and content download almost the same always…

Hi there,

This is surprising because the average search response time that I see for your app are always below 30ms and the average is below 5ms.
You can find this graph on your Algolia dashboard, in Monitoring > Performance.

Could you please share a live URL with us so that we can see the issue?

Thanks!

@marie.gillier sure you can view it on my life URL https://iskani.com – On page load I am making 3 requests… you can switch to english from app bar, and play around :slight_smile:

Hi @bdairy08,

Thank you for the link! I looked at your site but see fairly quick response times too. As was mentioned earlier in this thread, it is most likely the distance of your cluster from your location. Changing the location may be your best option.

You can see a list of cluster locations in this documentation. If you are interested in changing your cluster location, please email us at support@algolia.com and we’ll get it moved for you!

@cindy.cullen thanks. If you read the thread you would’ve known that the cluster has moved from US to Germany, and performance got improved. But I need further improvement. I am in Jordan Middle East. Is there any better location?