-
Improvement
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
Direct database search is still available as a fallback for when the indexed search is either unavailable or outdated (as in the search index doesn’t have the result at all or has an outdated result for some reason, which happens occasionally). While indexed search is able to handle a lot of requests, the direct database search is not. When a link to the direct database search is shared among Mastodon and queried hundreds of time, it results into hundreds of heavy queries to the database, making the whole website temporarily unavailable.
The proposed solution is to cache the results for 1min. It matches the statement timeout. It shouldn’t be a problem for users as they have to select it manually, unless they followed a link in which case the same results are expected anyway.
It should probably be renamed “cached” instead of “direct” or added in parallel in the code if we want to keep “direct” for editing forms.
- has related issue
-
MBS-12789 Clarify search methods on search page
- Open