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
There are some things that the worker can easily cache in memory which would greatly reduce the impact on the database as well as shave a lot of latency off uploads/downloads. e.g. fetching the contracts upon download/upload takes around 100ms on a node like Arequipa with lots of contracts.
Settings
UL/DL params
Hosts we have contracts with for downloads
To achieve that we need a few more features
Webhooks in the bus that notify the subscriber of changes to settings, contract set etc.
Worker needs to register appropriate hooks and fetch the latest value. Maybe keep a sane cache invalidation value (e.g. 1 hour) which forces fetching the values synchronously.
I would start with the following PRs:
Build cache in worker used by the download route for now. It should come with a way to invalidate the cache but for now the value should just always be considered invalid and the most recent value fetched from the bus
Identify and add necessary webhooks for download route to reach 0 synchronous bus calls (except for the one that fetches the object metadata for now)
Hook up cache to webhooks and test
The text was updated successfully, but these errors were encountered:
This PR updates the `bus` to trigger a webhook when certain events
occur. This PR is part of a series of PRs that eventually implements a
worker cache #1151
There are some things that the worker can easily cache in memory which would greatly reduce the impact on the database as well as shave a lot of latency off uploads/downloads. e.g. fetching the contracts upon download/upload takes around 100ms on a node like Arequipa with lots of contracts.
To achieve that we need a few more features
I would start with the following PRs:
The text was updated successfully, but these errors were encountered: