On 10/24/2016 03:16 PM, Joe Zeff wrote: > On 10/24/2016 02:34 PM, Gordon Messmer wrote: >> >> Yes, I get that. But why would it be better for the scheduler to start >> up database servers on multiple hosts and allow them to compete for a >> lock, rather than pick one host to start the database and start one >> instance? The former is what JD is suggesting (adapted to your >> proposal; as far as I can tell), while I suggest that the latter is >> probably a better approach if it's possible, and it usually is. > > I don't have the experience to judge which one is better; I was only > pointing out a reason that you'd not want multiple instances of the > database program working on the same file at any given time. A suggestion for this...use some scheduler like RabbitMQ. The database puts process requests up on the RabbitMQ queue, the worker machines pull requests off the queue and processes them. That way, only one machine processes one file at a time and you don't have any race conditions, PID file contentions, etc.. You can spin up additional workers as necessary to parallelize your operations to whatever level you want. Yes, it takes some coding, but I suspect that was expected. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@xxxxxxxxxxxxxx - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - On a scale of 1 to 10 I'd say... oh, somewhere in there. - ---------------------------------------------------------------------- _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx