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

Fix various networking limitations/issues before release. #51

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ewlsh
Copy link
Member

@ewlsh ewlsh commented Aug 25, 2020

  • Authentication should avoid unnecessary network calls.
  • Strict timeouts should be enforced on all user facing APIs
  • Listeners shouldn't gradually drain resources if Google Cloud outages occurs

TODOs

  • Test changes locally and in development
  • Ensure timeouts don't break iPad functionality
  • Enforce corresponding timeouts in web apps

@ewlsh ewlsh requested a review from ashneeldas2 August 25, 2020 18:44
@ewlsh
Copy link
Member Author

ewlsh commented Aug 25, 2020

@ashneeldas2 @henryz2000 see gygb-client-web/#58 for the corresponding issue on the frontend.

ewlsh added 3 commits April 8, 2021 21:41
If Firestore has an outage we currently run the risk of
exhausting resources by continuously attempting to
reconnect. Instead, we'll try to reconnect a few times
which should handle the case where a network error on our
side broke the connection.

Additional Changes
- Formatter cleaned up the file.
- Make cached access synchronous.
By default Node.js and express timeout after 2 minutes,
this is too long for our use case and Heroku, the current
host, gives an H12 (timeout error) after only 30 seconds.

Instead we now set the following timeouts:
- Database calls: 15 seconds
- API requests: 10 seconds
- API responses: 10 seconds
If a token is invalid locally, it will also be invalid on
a network call. Network calls only detect if a valid
token has since been revoked.
@ewlsh ewlsh force-pushed the ewlsh/fixup-networking branch from 784534f to c0cd36c Compare April 9, 2021 04:41
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

Successfully merging this pull request may close these issues.

1 participant