Plan caching to minimize server load (SSR, etc.) #422
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
Osprey
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
resilience
Tom's Wishlist
type: bug
type: discussion
type: error handling
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/spee.ch#422
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently spee.ch is not doing any caching (other than what
express.js
does natively out of the box. Spee.ch should cach rendered versions of pages so it doesn't have to do SSR tasks, MYSQL lookups, etc. repeatedly.One option for caching, using redis: https://www.npmjs.com/package/express-redis-cache
@lyoshenka also mentioned https://varnish-cache.org/ which sits in front of the web server
one issue for caching, raised by @skhameneh, is that SSR of page may need user session data.
This is currently solved by serving the site without a logged in guest, and having the client make an api call to update the redux state with any logged in user data.
another issue with caching is that the same url (e.g.
https://spee.ch/xyx/doitlive.jpg
) could be one of two types of request: (a) a request from a user that wants to view the asset in a web browser, or (b) a direct request for the asset from a page in which the asset is embeded.@lyoshenka suggested redirecting embed requests to a slightly different url (e.g. `https://spee.ch/embed/xyz/doitlive.jpg')
@billbitt cached responses should honor limited header data.
Ideally the cache, by default, should only store calls that don't contain session information.
Caches can exist at (some examples):