project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Assess facet request thresholds #179

Open brent-hartwig opened 2 weeks ago

brent-hartwig commented 2 weeks ago

Problem Description: Thresholds are in place to protect the system. When the facet response body changed to Activity Streams, the 'facet maximum product' threshold probably should have been reduced (or changed to different logic). Now that we are also on the cusp of paginating facet requests, we have a second reason to review this threshold.

Scope is to review all facet-related thresholds and adjust to align with the current implementation, striking a balance between conserving system resources, maintaining system stability, and providing end-uses access to all data.

Out of scope: thresholds for non-paginated facet requests. Our current direction is to always paginate but should that change, the scope of another ticket can handle those threshold changes.

Expected Behavior/Solution: Review the following thresholds and determine if any changes should be made.

  1. Non-semantic facet thresholds:
    • When the search result estimate multiplied by the associated index's value count exceeds a threshold set by the facetMaximumProduct property, the facet request is rejected.
    • 20 seconds
  2. Semantic facet thresholds:
    • Requests are limited to 100 values (hard-coded).
    • 59 seconds

Requirements: See above.

Needed for promotion: If an item on the list is not needed, it should be crossed off but not removed.

~- [ ] Wireframe/Mockup - Mike~

UAT/LUX Examples: Developer to specify all impacted types of facet requests.

Dependencies/Blocks: This ticket should follow #160 and #161. If those are held up too long, we should consider updating the 'facet product maximum' threshold sooner as the Activity Streams change (https://git.yale.edu/lux-its/marklogic/issues/1164) is already in production and can increase the response time by 3.1x and the response body size by 9.4x.

Related Github Issues: Paginated facet request's performance test: #162

Related links: None.

Wireframe/Mockup: Not needed.

brent-hartwig commented 2 weeks ago

cc: @roamye, @clarkepeterf