-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cache more responses from the database #780
Comments
Laravel's built in cache service provider only allows minutes for cache expiration which is not flexible enough. |
Wouldn't minutes be useful for image assets and stream URLs as they are unlikely to change that often and you can expire the cache on the admin side if you change them ? |
Maybe. But even just a few seconds would be a lot better than now which ended up being many times a second when there were many requests. |
Just thinking about how to make it as simple as possible to implement and setting it to minutes would allow you to use the build in cache service provider. |
Yeh. Minutes is too long for things like watching now though. Shouldn't be too complicated to write a separate cache driver that uses redis and allows seconds. |
Can now handle when hitting around 90% cpu
|
Is that requests able to be made when the server is around 90% CPU or is that the number of requests that cause 90% CPU ?
Also is that a figure for just making a request to the player page or as well as making it to the other endpoints as well ? Reasonable numbers for current use anyway. |
All the 100 ones were actually less than 90% but I didn't bother going higher as I don't think it'll ever get that high. People will only generally load a page once then stay on it. It's 90% cpu as a result of the requests. The 100 to player page is just getting the html back for the page. The one below is the ajax endpoint that the player periodically makes requests to get it's urls, view count etc. I don't think we'll go over 800 concurrent viewers but might get a few more cores added to the vm anyway. |
…connected Reduces load on server. Refs: #780
Things like stream urls and media item cover art files should be cached for a few seconds (or longer) as they don't change very often. Each page request shouldn't result in queries to the db to get information like this.
The text was updated successfully, but these errors were encountered: