Hacker News new | ask | show | jobs
by m0th87 4398 days ago
We developed the same thing: https://github.com/dailymuse/phantom-cluster

It was used for prerender [1] for some time, before being changed so that clustering happened at the HTTP worker level.

Scaling PhantomJS is no walk in the park. There's a lot of duct tape to get it to communicate with node.js, and it's easy for a memory leak to occur.

[1] https://github.com/prerender/prerender

1 comments

you are all doing it wrong... we use phantomjs on its own. and run the test code in it. so its analogous to loading the target page, and then running your code/test in a browser dev console. you take care of concurrency and retries in your preferred shell. this also allows things like integration with Makefiles, etc.

using it inside node is just masochism.