When Nexus has a large number of repositories, particularly staging repositories, performance of the UI can degrade viewing the repository list, and this can also impact the performance of the server overall.
Configure Nexus with
- a single hosted maven 2 release repo
- a single Central Repository proxy repo
- a staging profile and single staging repository ( represents a Nexus managed repo )
- a single maven 2 group repo containing both all other repos
1. Login to Nexus as an admin user.
2. Click Repositories list to show it.
3. Notice Nexus sends two requests to /nexus/service/local/repository_statuses - for each repository, Nexus decides if the user has view/read permissions.
- the first request responds with 202 accepted and a list of the statuses of all repositories
- the second request approx. 5 seconds later responds with 200 and data including remoteStatus of all proxy repositories is included - the statuses of the proxy repositories are updated with the remoteStatus value changed from "UNKNOWN" to their blocked status ( AVAILABLE, AUTO_BLOCKED, etc. )
1. Configure your browser to use an intercepting proxy. Set a breakpoint to never respond to ( block but do not return ) /nexus/service/local/repository_statuses requests - this is to simulate a Nexus instance which is slow to respond because it is busy evaluating permissions.
2. Login to Nexus as an admin user.
3. Click Repositories list to show it.
4. Notice Nexus sends a new /nexus/service/local/repository_statuses request every 5 seconds until very first request times out due to UI timeout. Nexus decides if the user has view/read permissions per repository for each of these requests.
- When the repository list UI filter is displaying the User Managed repositories list, the repository_statuses resource need not include data for, or perform permissions checks on Nexus managed repos not even displayed to the end user.
- Nexus UI should limit number of repository status requests made to the backend. For example, can the two requests be combined? Can only proxy repos be evaluated when the remote status needs updating in the UI.
- Nexus should not retry these potentially expensive requests every 5 seconds if the first request is simply slow to respond
- Potentially explore a no op function for status
- Potentially only show status for Admin users