bot_verifier_redis_read_timeout
The `bot_verifier_redis_read_timeout` directive configures the read timeout duration for Redis connections within the NGINX bot verification module.
Description
The bot_verifier_redis_read_timeout directive specifies the maximum time (in seconds) that NGINX will wait for a response from the Redis server before it decides to time out during a read operation. This is crucial in ensuring that requests to the search index bot verification module do not hang indefinitely when waiting for data from Redis, which could severely degrade the response time of your web application. By setting this timeout, you help maintain the overall performance and reliability of your NGINX server.
This directive accepts a single argument, which should be a positive integer representing the number of seconds. If this value is set too low, it might result in frequent read timeouts, especially under heavy load or slower Redis performance. Conversely, a value set too high may result in delayed responses to legitimate requests due to network issues or high Redis load. Hence, careful tuning of this value based on Redis performance and application requirements is recommended. Adjusting this directive should be a part of your broader cache connection management strategy within the bot verification module.
Config Example
location / {
bot_verifier on;
bot_verifier_redis_host localhost;
bot_verifier_redis_port 6379;
bot_verifier_redis_connection_timeout 10;
bot_verifier_redis_read_timeout 5; # Set to 5 seconds for read timeout
bot_verifier_redis_expiry 3600;
bot_verifier_repsheet_enabled on;
}Setting the timeout too low may lead to false negatives in verification due to read timeouts.
If there's an intermittent connectivity issue with Redis, increasing this timeout may help in avoiding unnecessary request refusals.