2

I have a web service handling http requests to redirect to specific URLs. Right the CPU is hammered at about 5 million hits per day, but I need to scale it up to handle 20 million plus. This is a production environment so I am a little apprehensive about the new Node Cluster method b/c it is still listed as experimental. I need suggestions on how to cluster Node on handle the traffic on a linux server. Any thoughts?

Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
Dustin Davidson
  • 131
  • 1
  • 2
  • 8
  • 3
    Well, you already have the Node-based answer -- the [cluster module](http://nodejs.org/api/cluster.html). Beyond Node are numerous options for [load balancing](http://en.wikipedia.org/wiki/Load_balancing_(computing)#Vendors) multiple physical or virtual machines that each execute your web service. Though, note that any truly breaking changes will appear between major/minor versions -- [v0.6 vs v0.8](https://github.com/joyent/node/wiki/API-changes-between-v0.6-and-v0.8) -- rather than between revisions -- e.g., [v0.6.15 vs. v0.6.16](http://blog.nodejs.org/2012/04/30/version-0-6-16-stable/). – Jonathan Lonowski Jun 13 '12 at 22:38
  • I think you mean scaling (also)? => http://stackoverflow.com/a/4710617/11926 – Alfred Jun 14 '12 at 11:45

1 Answers1

0

5 million per day is equivalent to 57.87 per second, and 25 million is 289.4 per second. These numbers are not too much for a single server for your case. If you only want to redirect specif urls, you can go with another alternatives such as nginx that is more fit for that job. However, if you still want to use NodeJS, I think a modern server can handle that load. Look at my blog post as an example of how to use clustering: NodeJS: Simple Clustering Benchmark. If you want to use all of your cores, you should use clustering.

Mustafa
  • 10,013
  • 10
  • 70
  • 116
  • Without information on the software versions used, the referenced information is totally meaningless. Cluster is limited to Node < v0.6 and so doesn't run on the current version. Native clustering doesn't appear until the next version of Node. – Julian Knight Jun 19 '12 at 21:43