hasura / hasura/graphql-engine
Provide a configuration to configure total max event poolsize (cumulative count over horizontal scaling)
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
AFAIK the current the pool size configuration means `Max event processing threads` and this is per instance, and when Hasura runs horizontally this value could get multiplied.
#### What can go wrong?

* Suppose If I have a event stream that goes down for some time
* and when it comes back It could have significant load on the Hasura event queue
* I would expect Hasura to unload that without having more than 100 (or whatever the poolsize) request at the same time.
* Now if I have Hasura running horizontally (may be even with an auto scale setup) this could load my event handler in unexpectedly high rate.
* (If I have 3 hasura instances up, Hasura would have 300 simultaneous requests, which I may not expect my RHS system to handle)
* The event handler that I have in the RHS may not be designed to handle that much load, this could cause errors
### Describe the solution you'd like
There should be a way to configure cumulative total max http poolsize instead of the event pool size. (just like `total_max_connections`)
### Describe alternatives you've considered
If I have control over RHS, probably I can load balance RHS system or event increase the resources, but considering the expectation is to have Hasura manage the queue, this may not be a good solution.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating the current event pool-size configuration and the existing total_max_connections handling, then trace how event processing behaves across horizontally scaled instances. Done means a cumulative maximum can be configured and prevents the event handler from receiving more concurrent requests than that limit.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100