Reg. maximum questions per second

We get emails showing that we exceed our max QPS.
Algolia searches in most cases from the very first button pressed. That means that only typing a search word into the search input launches several queries. All of your lower level clients have to program some sort of debounce, or time-delay, into their search fields, because, at least on the free tier, 30 QPS (and 75 QPS on the essential plan) is just too low. I’d really really love to use Algolia.
If we’d launch the site with algolia and, as is standard in your wordpress plugin, used search from first button pressed, our visitors would quickly overwhelm the 75 max QPS. Would you bill us extra? Would the service just stop(as you mention in the email notifications)?

Edit:
Is there perhaps another reason that we get a very high QPS, even though we are only two developers on the project? is there some optimization that we should do within the Wordpress?


Debounce is achievable with the queryhook parameter. Wordpress plugin outofthebox does not set any debounce time.

1 Like

Hi @lt1,

Thanks for the candid feedback.

Indeed we have no debouncing by default in the WordPress plugin.

Debouncing is something hard to do right. It is even harder to implement a debouncing that works well for everyone and that is mainly the reason we do not enforce any by default.

You are indeed free to implement your custom debouncing logic based on the instantsearch query hook.
The challenge being to still let the user feel he is using an “as-you-type” search experience, and thus finding the right debounce time threshold.

Regarding the QPS, Algolia will NEVER shut down your application because it momentarily reaches a certain QPS limit. However, if the load persists, we will ask you to upgrade your plan or contact our commercial support in order to adjust the allowed QPS metric.

In some cases, it might be worth inspecting the queries sent to Algolia in order to understand why you are reaching the QPS limit. We have seen in the past some implementations that were having the side effect of sending to many queries. Let me know if you find an issue or if you think something goes wrong with your implementation.

I hope my answer meets your expectations,

I’d be happy to continue the discussion.

Also, what could explain the high QPS is if you’re searching into several indices at once. If for example you’re searching into 5 indices at once, each keystroke will count as 5 QPS (even if batched into one HTTP request for transport to our servers).

1 Like

Thanks for the reply, both of you.
That settles our hearts a bit, and we’ll move forward with your excellent platform.
We currently search in two different indices in two different search fields. One searches our wordpress all searchable data(your standard plugin), and one searches an index that only lists a certain post type. We implemented debounce on the latter one, but we’ll remove that again, and see if we still get qps spikes.

1 Like

That seems like the good solution, hope it will give you satisfaction. Don’t hesitate to come back here and let us know how it went.