Nogtail Posted March 23, 2016 Report Posted March 23, 2016 After some scalability issues with my site I decided to make the most of multiple cores and use Cluster to create many worker processes. It makes no sense to log in and poll on every worker process, so I would like to create and share a single instance of the Tradeoffer Manager between all workers. Is sharing a single instance Tradeoffer Manager the best way to do this? Are there any features of Tradeoffer Manager that would let me use multiple instances on every worker, but not waste resources logging in and polling on each one? If sharing a single instance is the best way to go, then what is a good way to be able to access it from the workers? I would rather use a callback-style interface if possible. Thanks in advance. Quote
Nogtail Posted March 23, 2016 Author Report Posted March 23, 2016 How many bots are you running?I have a 'BotManager' that loads bots from a JSON file. Currently I only have 4 bots, but depending on the success of the site this will be increased. I would like to have a bit of room for expansion so I am trying to design everything to work with 20+ bots. Quote
Dr. McKay Posted March 23, 2016 Report Posted March 23, 2016 Clusters are designed for applications which have to process lots of things at once (like many user requests). Running bots is really not a good use for clusters. I'm personally running 30 bots within the same node process on low-end VPSes and the only problems I'm having are Steam IP limits. Quote
Nogtail Posted March 24, 2016 Author Report Posted March 24, 2016 Clusters are designed for applications which have to process lots of things at once (like many user requests). Running bots is really not a good use for clusters. I'm personally running 30 bots within the same node process on low-end VPSes and the only problems I'm having are Steam IP limits.It isn't the bots that are causing the performance issues but building the dynamic pages and other relatively CPU intensive tasks. So you would recommend having a single instance my Bot Manager and access it over IPC? Quote
Dr. McKay Posted March 24, 2016 Report Posted March 24, 2016 Yeah making your bots separate from your site is probably your best bet. Nogtail 1 Quote
cookie Posted March 24, 2016 Report Posted March 24, 2016 Clusters are designed for applications which have to process lots of things at once (like many user requests). Running bots is really not a good use for clusters. I'm personally running 30 bots within the same node process on low-end VPSes and the only problems I'm having are Steam IP limits. Is there a considerable performance boost when running all bots in a single node process? Quote
Dr. McKay Posted March 24, 2016 Report Posted March 24, 2016 I don't imagine there's a massive difference unless you're doing heavy overhead tasks. Quote
cookie Posted March 24, 2016 Report Posted March 24, 2016 I don't imagine there's a massive difference unless you're doing heavy overhead tasks. Well, consider of having an array of bots that needs to get working, I find it hard to come up with a proper way of executing each bot while looping through it therefore I stick into executing each bot in a single process. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.