-
Notifications
You must be signed in to change notification settings - Fork 144
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
last_modified header support + optimisation #1147
Conversation
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
…upport Signed-off-by: Alexander Piskun <[email protected]>
apps.json
endpointSigned-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
I come from #761 about Appstore not show in the Nextcloud (just first time install using Docker) On my Nextcloud log there are many cURL error 28 for
So I try speed test on my browser and load the JSON, it took about 7-15 minute to load the JSON file My average speed is between 5-30 mbps but the JSON is painfully slow. Is this cause cURL 28 error and cause Appstore not showing on Nextcloud panel. Is there alternative to load Nextcload Appstore, like example replace |
@officialdanielamani can you retry? |
If I have apps.json file, can I add to Nextcloud file so I no need to lookup every time I need load. The connection speed I cannot change because it's my internet speed plan. |
There is already should be local apps.json file located in |
Is I just add |
I try reinstall the Nextcloud maybe it will fixed the problem. Thank you for support and guide. |
Edit: After waiting for hours suddenly it working. Speed test get about same result, so don't know why The only clue is the
When I reinstall, there is option skip suggestion and install suggestion, but no preview of app. I click install but it just redirect to dashboard. The Appstore still missing and folder https://help.nextcloud.com/t/cant-install-apps-curl-error-28-ssl-connection-timeout-solved/149920 Here is my docker compose
|
I really don't know how I can help here. :( |
This is fine, 12.1 Mb size with all applications releases info, and NC stores only releases information for it's version. |
This is a dev PR, after testing it will be adjusted if everything is ok.
The reason for this PR:
Most requests to the AppStore do not send ETag and this leads to a very high load.
This should help with this: the binary result of the request/api/v1/apps.json
will be stored in Redis, and the next time if the request does not have an ETag in the header, but the response for this Etag is already in Redis, the result will be directly returned from Redis.Changes in PR:
Last Modified
header in addition to ETag, feel free to use any of this headers you like.By what percentage this will reduce the load it will soon become clear; the PR will be edited with these data.
Local benchmarks(
apps.nextcloud.com
is local url in this case):Original code:
Cold/Hot run: 27.58 / 24.42
With this PR:
Cold/Hot run: 12.56 / 8.82
Expected load reduction in a production environment on the server: 2 to 4 times.
Still will be very high load during app release deletion or uploading, but it is another complex topic.