bsm / poseidon_cluster

Poseidon cluster extensions
42 stars 43 forks source link

How to deploy poseidon_cluster with high performance? #28

Closed liukgg closed 8 years ago

liukgg commented 8 years ago

I'm about to use poseidon_cluster in my company's project. I use the method "fetch_loop", and I deploy with rake and the gem "god". It can run normally now , but it still has some small problems not fixed perfectly. Does anyone have some experience on how to deploy and use poseidon_cluster in the production environment? Any advice will be appreciated.Thanks!

mensfeld commented 8 years ago

@liukgg could you describe what type of problems do you have?

liukgg commented 8 years ago

How to keep the consuming process running forever ? And how to start this process? Is there a best way to do this?

mensfeld commented 8 years ago

@liukgg to make it run forever you can use fetch_loop. However I would not recommend it and would advice you to fetch, process and reconnect. This way you can easily adapt to cluster changes.

There is no general way to start the process since this is kinda a low level library. You can look into https://github.com/ghazel/daemons to make it run as a deamon, you can run it with http://godrb.com/ provisioning, http://www.jstorimer.com/blogs/workingwithcode/7766093-daemon-processes-in-ruby or you can use Karafka - it uses poseidon cluster underneath and provides some additional flavour: https://github.com/karafka/karafka

mensfeld commented 8 years ago

@liukgg if it helped and you don't have any more questions, please close this issue

liukgg commented 8 years ago

Thanks!