hasura / hasura/graphql-engine
server: failing web hook cache making requests timeout
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.37.0
### Environment
EE
### What is the current behaviour?
Currently, we have an issue where Redis connections can end up “dead” and just fail to return any data given some [TLS settings](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices-connection#tcp-settings-for-linux-hosted-client-applications)
This manifests in very slow lookups to the auth hook cache. This is in context to [webhook auth caching feature](https://hasura.io/docs/latest/auth/authentication/webhook/#webhook-auth-caching).
### What is the expected behaviour?
The fix is to add a configurable timeout for Redis operations - if any operation takes over this time, we should close the connection and consider the operation failed (falling back to either the actual auth hook, or the actual request, whichever makes suitable fallback option at this time)
### Keywords
redis webhook auth caching
Contributor guide
Research direction
Start with the webhook auth caching flow and its Redis connection and operation handling, using the linked webhook auth-caching documentation for context. Trace how slow Redis lookups affect the auth hook and request fallback; done means a configurable operation timeout closes dead connections and applies the suitable fallback without requests timing out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100