タグ

Clusterに関するreboot_inのブックマーク (2)

  • Setting up a Node.js Cluster

    We all know Node.js is great at handling lots of events asynchronously, but what a lot of people don't know is that all of this is done on a single thread. Node.js actually is not multi-threaded, so all of these requests are just being handled in the event loop of a single thread. So why not get the most out of your quad-core processor by using a Node.js cluster? This will start up multiple instan

  • Node.jsのClusterをセットアップして、処理を並列化・高速化する | POSTD

    Node.jsが多数のイベントの非同期な処理に長けていることはよく知られていますが、それが単一のスレッドで行われていることを多くの人は知りません。Node.jsは実際にはマルチスレッドではないので、リクエストは全て単一スレッドのイベントループで処理されているだけなのです。 そこで、Node.jsクラスタを使って、クワッドコアプロセッサの能力を最大限に引き出しましょう。コードの複数のインスタンスで起動し、さらに多くのリクエストを処理します。少し難しく思えるかも知れませんが、Node.js v0.8で導入された cluster モジュールを使えば、実はとても簡単です。 もちろん、これは、作業を別々のプロセスに分割することのできるアプリならどんなアプリにでも役立ちますが、webサイトのような多くのIOリクエストを処理するアプリには特に重要です。 残念ながら、並行処理は複雑なので、サーバ上でのアプ

    Node.jsのClusterをセットアップして、処理を並列化・高速化する | POSTD
  • 1