You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current mapathon ongoing, we've seen the firebase bill go through the roof, even with @Hagellach37 's fix 2-3 days ago on this code (which limits loading to the mappers who've opened the app in the last 24h, instead of all users ever).
There is still a lot of download happening, apparently because users keep refreshing the leaderboard a lot more than we expected.
An option to mitigate this cost in downloads could be to run a function server-side (within firebase) that prepares and caches values to show. For instance, we could imagine running a function every 5 minutes, which would simply run the current query, and copy the result onto some cloud storage (or VPN), and modify the frontend to load that file from bulk storage instead of firebase (and we put some caching logic there so that browsers don't reload more often than once/5 minutes for instance).
This would give us both lower transfer costs (we would effectively only have 1 load/5 minutes), and possibly faster loading for the leaderboard.
The text was updated successfully, but these errors were encountered:
This is currently based per project, but we could adjust this and provide a file for all users and use some compression as well. So basically by merging all the existing files.
Currently these things are updated once every hour. Not sure if this is enough? From the backend side updates more frequent than every 15 minutes will be a bit harder.
With the current mapathon ongoing, we've seen the firebase bill go through the roof, even with @Hagellach37 's fix 2-3 days ago on this code (which limits loading to the mappers who've opened the app in the last 24h, instead of all users ever).
There is still a lot of download happening, apparently because users keep refreshing the leaderboard a lot more than we expected.
An option to mitigate this cost in downloads could be to run a function server-side (within firebase) that prepares and caches values to show. For instance, we could imagine running a function every 5 minutes, which would simply run the current query, and copy the result onto some cloud storage (or VPN), and modify the frontend to load that file from bulk storage instead of firebase (and we put some caching logic there so that browsers don't reload more often than once/5 minutes for instance).
This would give us both lower transfer costs (we would effectively only have 1 load/5 minutes), and possibly faster loading for the leaderboard.
The text was updated successfully, but these errors were encountered: