HangfireIO / HangfireIO/Hangfire
Questions around hangfire redis cluster scalability
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
Hey all
I'm currently using Hangfire with an AWS Elastic Cache Redis Cluster and noticed that I don't seem to be able to use the cluster capabilities to scale horizontally as I would like.
I got a single job type created multiple times during the day. It seems that all of these jobs are being mapped to a single shard.
I know that Redis Cluster manages the key distribution by hash and Hangfire works with transactions and set a prefix at the time of connection to guarantee the same hash.
So my questions are:
- Is Hangfire using the prefix specifically to ensure all writes end up in the same shard since that's the only way for transactions to work?
- Do transactions span multiple jobs at all? If so, why? If not, is there a workaround where each job can have its own prefix so that different jobs can land in different nodes and so that we can ultimately leverage Redis horizontal scalability?
Thank you in advance
Contributor guide
Research direction
No files or tests are named. Start by examining how Hangfire's Redis connection prefix and transactions interact with AWS ElastiCache Redis Cluster, then determine whether separate job prefixes are possible and whether cross-job transactions are required; done means providing a confirmed answer or an agreed implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, csharp, redis
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100