Closed jpdillingham closed 2 years ago
Code that implements this library can easily handle this logic itself. You could argue (and be correct) that the need to do so will not be obvious, but dropping incoming requests won't be obvious either and I think that's the greater of two evils.
This functionality probably should have been added along with the search request handling logic initially.
If a client is slow to respond to requests (running on low spec hardware, inefficient search matching, etc), it is possible for the average time to service an incoming search request to exceed the average rate at which searches are received. When this happens, the number of search requests will steadily climb until the application crashes.
Rather than allowing this to happen, this library should begin dropping incoming search requests. A warning should be logged so that users know it is happening.