Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate limiting API calls #99

Open
kg-bot opened this issue Feb 8, 2020 · 5 comments
Open

Rate limiting API calls #99

kg-bot opened this issue Feb 8, 2020 · 5 comments

Comments

@kg-bot
Copy link

kg-bot commented Feb 8, 2020

Right now it will query google API on each letter which is going to reach API limit pretty soon, I was working on this today, testing only and it reached over 3000 requests for ~100-200 searches, I can't even imagine what would this do to our bill in production.

@dschreij
Copy link

dschreij commented Mar 12, 2020

It would be a nice idea indeed if one has a way to provide a function that handles the API request itself, or add an option to debounce the API requests.

@yossivcita
Copy link

The pricing per session vs per call is not really new, its since 2018.
We get charged per api instead of per session (different token per each call), this is costing us thousands of dollars a month...

@vaclav-dvorak
Copy link

vaclav-dvorak commented Nov 4, 2020

This is definitely an issue. Even session pricing have to be implemented in js call. Please have a look for example here for more info:
https://blog.woosmap.com/implement-and-optimize-autocomplete-with-google-places-api

Ideally we would use session token plus debouncing
Debounce time could be passed as prop.

I got charged tens of dollars of credit just by testing this yesterday few times. Strange thing is that internet states that autocomplete widget handles sessiontoken automatically... However that doesn't seem to be the case in billing afterwards :(

@dschreij
Copy link

dschreij commented Nov 4, 2020

I made an attempt at implementing a location autocomplete box myself using vuetify's v-combobox and this was relatively simple and resulted in a quite small component. See the gist at https://gist.github.com/dschreij/06ac09c3ac9be4be4d25849f08eb3121
It implements session tokens (to my best knowledge) in that multiple requests reuse the same session token, until a places details call is made.

@vaclav-dvorak
Copy link

I've also found this lengthy proof that suggest that session billing is actually probably working quite perfectly out of the box with Autocomplete Widget.
https://www.tfzx.net/article/3932373.html

#99 (comment)
this looks great thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants