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

Vestigial variable DataUpload::lastConnectTime #133

Open
2 tasks
ntlhui opened this issue Nov 15, 2024 · 3 comments
Open
2 tasks

Vestigial variable DataUpload::lastConnectTime #133

ntlhui opened this issue Nov 15, 2024 · 3 comments
Assignees

Comments

@ntlhui
Copy link
Contributor

ntlhui commented Nov 15, 2024

system_tick_t lastConnectTime;

In smartfin-fw, there was a limitation that we could not connect to the Particle network more than once a second. There was some logic to rate limit the number of connections made.

  1. Investigate whether such a limitation exists in Tracker SOM/Gen3 Particle devices.
  2. Ensure that the logic of DataUpload and sf::cloud consolidates network connections to minimize churn on network state.
@charliekush
Copy link
Contributor

charliekush commented Nov 29, 2024

According to the docs the limit is now "Maximum of 10,000 requests every 5 minutes".

@ntlhui
Copy link
Contributor Author

ntlhui commented Nov 30, 2024

So this corresponds to 33 requests per second across the entire fleet. We can probably incur many connect/disconnect events in rapid succession per device, but we want to avoid this anyhow to conserve energy. So we want to probably implement a per device limit. I think it will probably suffice to do a limitation of one publish per second, and an exponential back off for connect from once per second to once every 6 hours on connection failure. Probably want to do a connection timeout of 1 second or so, that way the system isn't sitting there churning, maybe an exponential gain of 2 or 3?

@ntlhui
Copy link
Contributor Author

ntlhui commented Nov 30, 2024

This should probably go into a decision log

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

When branches are created from issues, their pull requests are automatically linked.

2 participants