Jump to content
McKay Development

Use Tradeoffer Manager with Node Cluster


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...