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

Component trigger many internet calls #10

Closed
elad-bar opened this issue Mar 15, 2022 · 2 comments
Closed

Component trigger many internet calls #10

elad-bar opened this issue Mar 15, 2022 · 2 comments

Comments

@elad-bar
Copy link
Contributor

I'm using the component for 4 devices I have,
After deep investigation of an increased number of DNS calls from the devices I found out that the component is fetching data of FwUpdate and internetConnectivityStatus which samples Google cloud,
Since the update mechism of the component is running every 30 seconds, it generates in best case scenario 5 DNS calls every 30 seconds - 14k requests a day per device!

To solve it, I suggest to perform internetConnectivityStatus call only once every few minutes and FwUpdate can be performed once a day.

It can also be based on configuration with default values.

thanks

@rroller
Copy link
Owner

rroller commented Mar 15, 2022

Wow, thank you. I will address this asap

@elad-bar
Copy link
Contributor Author

@rroller , checked the service sequence in the UI once again,
once logging in, there is a full request of all data, if you are activating the auto-refresh, it will do small calls per widget,
it gave me the idea that might assist you addressing the issue:
remove the 2 request parameters from the JSON.
If the last request time for FwUpdate is greater than X minutes or None - Add it just for that specific call,
same will go for the internetConnectivityStatus with different variable to allow 2 configurations (as firmware upgrades are less frequent than internet connectivity changes).

rroller added a commit that referenced this issue Mar 17, 2022
Fixed #10 - Component trigger many internet calls
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

2 participants