Comments (6)
@epelc, thank you for letting me know about this. Sentinel support is something I can try and include if needed.
When I was first writing zoom I tried out several different redis drivers before settling on redigo. I have been very very happy with it so it would take a lot to convince me to switch.
If sentinel support is important to you and/or other users, I would prefer switching to hbcheng's fork in order to provide that. I'd also probably chime in on garyburd/redigo to see if we could get it merged into master.
go-redis/redis looks okay at first glance. I've been looking over the source code, in particular to see how they manage connection pools and pipelined commands. The support for scripts is not as good as in redigo, which handles the EVALSHA semantics for you and just lets you call Do
. I also have some concerns about thread-safety on go-redis and opened an issue asking for clarification.
@epelc are you working on an application that requires sentinel support? Or is anyone else? If so I'll make this issue a higher priority.
from jobs.
@albrow I'd be happy if we could get the sentinel fork merged back into redigo. I was looking over the commit history and it has been actively developed. I also prefer the strings as commands approach which is like mgo.
Heres some background why I asked for this.
I currently run a 3 node master slave redis setup with 2 slaves. They all run in docker with --restart=always
so they auto restart if they crash or if the machine reboots/start stops etc. But I had an issue with how I mounted the config file for redis there was a race condition. This lead to my master dying anytime the machine rebooted(but not if redis crashed).
Anyways I fixed the race condition and it handles restarts fine now but I'd like to have a more HA type setup and sentinel seems prod ready now. Essentially redis has become the weak point of my stack(everything else is HA with 2 failover nodes) if my redis master blows up I need manual intervention(everything else I can have 1-2 masters blow up).
I'll probably switch my app over to the fork you mentioned and test it out. But I'd be much happier if jobs supported sentinel too.
from jobs.
@epelc Thanks for sharing your setup. I want to implement sentinel support for you and anyone else who needs it, but it's going to take some time. Just so we're on the same page.. I want to layout the requirements for sentinel support:
- Configuration should take a list of master addresses instead of a single address. (Should jobs write to all masters?)
- In the event of a failover (i.e. when a master fails and a slave gets promoted to the new master), writes that would have been sent to the old master should be sent to the new master.
Is this what you had in mind? Am I missing anything?
from jobs.
@albrow I don't think I was clear. I have 1 master and 2 slaves. If I used sentinel then say my master blows up sentinel would turn one of my slaves into the new master. Then the old master if it ever came back would become a slave.
I think the only time you have multiple masters is if your using redis cluster but I don't know much about that. I'd just change the list of masters to a list of servers. I'm also not sure if you configure the redis client with the list of redis servers or the list of sentinel servers I'll have to look into this. I'll get back to you after I try out that fork you mentioned.
from jobs.
Okay thanks. I think I understand the single master, multiple slaves use case pretty well. The reason I asked about multiple masters is that this API documentation mentions the SENTINEL masters
command which returns a list of masters. I think maybe multiple masters is another redundancy technique? Maybe a less common one. Or maybe the multiple masters are supposed to be independent and not share data.
from jobs.
I think it's for redis cluster as I'm pretty sure they use a master and several slaves for each group of ids(they break your keys into groups to spread out over your cluster). I think you would use the SENTINEL slaves masterName
command to get a list of slaves for the master you give it.
from jobs.
Related Issues (20)
- Use go generate to convert lua script files to strings HOT 4
- Use an interface for jobs instead of a non-type-safe handler function (would break backwards-compatibility) HOT 4
- Export job.freq HOT 4
- Reschedule with freq HOT 2
- FindById() doesn't return error for missing jobs HOT 7
- Add a changelog HOT 2
- Panic in xen container HOT 4
- Job runtime error messages should include a stack trace
- Error when calling Destroy() from within a job handler function HOT 8
- job not exec with panic HOT 8
- FindById and job identifiers/human names HOT 6
- Examples?
- Passing params / string name of job. HOT 2
- Endless loop? HOT 6
- Error Handling? HOT 5
- Application can't start due to error which message is 'jobs: In scanJob: Could not find Type with name = %s' HOT 1
- super slow HOT 1
- Support environmental prefix
- Job status is changed to executing but job has not started execution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jobs.