{"action":"created","issue":{"url":"https://api.github.com/repos/TopCloud/socketcluster/issues/36","labels_url":"https://api.github.com/repos/TopCloud/socketcluster/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/TopCloud/socketcluster/issues/36/comments","events_url":"https://api.github.com/repos/TopCloud/socketcluster/issues/36/events","html_url":"https://github.com/TopCloud/socketcluster/issues/36","id":52600396,"number":36,"title":"How To Scale SocketCluster Across Multiple Machines?","user":{"login":"1manStartup","id":2334628,"avatar_url":"https://avatars.githubusercontent.com/u/2334628?v=3","gravatar_id":"","url":"https://api.github.com/users/1manStartup","html_url":"https://github.com/1manStartup","followers_url":"https://api.github.com/users/1manStartup/followers","following_url":"https://api.github.com/users/1manStartup/following{/other_user}","gists_url":"https://api.github.com/users/1manStartup/gists{/gist_id}","starred_url":"https://api.github.com/users/1manStartup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1manStartup/subscriptions","organizations_url":"https://api.github.com/users/1manStartup/orgs","repos_url":"https://api.github.com/users/1manStartup/repos","events_url":"https://api.github.com/users/1manStartup/events{/privacy}","received_events_url":"https://api.github.com/users/1manStartup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-12-21T17:08:36Z","updated_at":"2015-02-11T19:17:32Z","closed_at":null,"body":"Hi there. I'm looking to scale SocketCluster in production across multiple machines horizontally. \r\nI read your response to another user (https://github.com/TopCloud/socketcluster/issues/12) on the role that NData plays in SC, but am not sure how to scale.\r\n\r\n1) Would SocketCluster be scaled the same way socket.io is scaled across multiple machines using redis pub/sub,MessageQueue, HAProxy?\r\n\r\n2) Would the 'SocketCluster' cluster object need to be configured in any way for multiple servers, for example I notice the sample code has the following settings:\r\n\r\n balancers: Number(argv.b) || 1,\r\n  workers: Number(argv.w) || 1,\r\n  stores: Number(argv.s) || 1,\r\n\r\n But what would determine the number '1' here? The number of cpu cores on each machine? Or how many servers we are trying to scale horizontally with?\r\n\r\n3) Also does SocketCluster still require the built-in node cluster module (http://nodejs.org/api/cluster.html) to be used, to access multiple cpu cores?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/TopCloud/socketcluster/issues/comments/73944866","html_url":"https://github.com/TopCloud/socketcluster/issues/36#issuecomment-73944866","issue_url":"https://api.github.com/repos/TopCloud/socketcluster/issues/36","id":73944866,"user":{"login":"1manStartup","id":2334628,"avatar_url":"https://avatars.githubusercontent.com/u/2334628?v=3","gravatar_id":"","url":"https://api.github.com/users/1manStartup","html_url":"https://github.com/1manStartup","followers_url":"https://api.github.com/users/1manStartup/followers","following_url":"https://api.github.com/users/1manStartup/following{/other_user}","gists_url":"https://api.github.com/users/1manStartup/gists{/gist_id}","starred_url":"https://api.github.com/users/1manStartup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1manStartup/subscriptions","organizations_url":"https://api.github.com/users/1manStartup/orgs","repos_url":"https://api.github.com/users/1manStartup/repos","events_url":"https://api.github.com/users/1manStartup/events{/privacy}","received_events_url":"https://api.github.com/users/1manStartup/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T19:17:31Z","updated_at":"2015-02-11T19:17:31Z","body":"@jondubois would client->client be scaled different than client->server->client? I'm currently doing clientA publish while clientB is subscribed. Any data I want to save I would do socket.watch on ClientA, and post to MQ with the onWatch event. So from client (watch event)-> .emit to server (publish on MQTT) -> But then from MQTT onSubscribe?? Would I emit back to ClientB using the Store Object?\r\nhttp://socketcluster.io/#!/docs/api-store"}}