-
Notifications
You must be signed in to change notification settings - Fork 178
Follower only River job processors #1143
Hello!
I'm doing a kind of hacky thing and using a silo'd river queue as a make-shift container scheduler for batch jobs. The setup is the default queue runs the normal jobs for my application but tasks which require special system dependencies get dispatched to a split queue and picked up by the specialized nodes.
So far it works well and has the nice property of being able to kick off containers from your application just by creating jobs like normal.
One awkward part is leader election. Periodic job configurations have to sprawl to these other binaries that are pretty sparse (mostly just simple control plane code and startup) because they may get elected leader and if the periodic jobs aren't there it causes the entire system not to register the jobs.
Curious if anyone has done anything like this. What I found myself wanting was a way to turn off the ability for a client to participate in leader election at all - they act solely as followers and consumers of jobs on the queue.
Anyway cheers!
All reactions
Replies: 1 comment 1 reply
Giving clients an option to elect not to participate in leader electionship doesn't strike me as the worse thing ever. @bgentry Thoughts?
All reactions
I think it could be an option for certain use cases where users have very ephemeral workers. I'd be fine with adding it as long as the docs were clear about when and how to use it (if you don't have actual leaders consistently running you're going to have a very bad time).