Open dakami opened 11 years ago
Hi dakami, I agree an example will help. Cert, etc will be configured in express because all c2 does is listen on the provided ports to serve the app. But will try to put together an example.
Much appreciated. This is actually the best way to make Node multi-core right now (congratulations), so your reward for excellent work is more work.
This info may be helpful. http://stackoverflow.com/questions/11804202/how-to-setup-a-ssl-cert-in-express-js-server-now
This might be more trouble than it's worth but it would actually be pretty neat to be able to support http & https apps at the same time for those who wants to secure portions of their site. Looking at the source it seems rather iffy to stuff that support in though, any ideas?
C2 only listens on the ports provided to server the app(s) (again provided by user). If express, etc server is configured with certificates then I am not sure if anything needs to be done in C2.
Cluster2 only listens on one port (well, it also listens on Monitor, but that's a bug). I could run two clusters, even going so far as to dual-process each core, but then I'm posting sessions to the same express app. If I have two apps, one with and one without ssl, I need to double configure both apps to have all the routing wired up.
What I want is a hook that says, if the app saw its comms come in from SSL, then use this SSL config but otherwise be normal.
Cluster2 can run on as many ports as you like. We need to update the doc but we have recently made changes were you can can pass Express App and port pair and cluster2 will serve them. Here is an example: https://github.com/ql-io/netmorphic-template/blob/master/index.js
On Fri, Mar 1, 2013 at 4:32 PM, dakami notifications@github.com wrote:
Cluster2 only listens on one port (well, it also listens on Monitor, but that's a bug). I could run two clusters, even going so far as to dual-process each core, but then I'm posting sessions to the same express app. If I have two apps, one with and one without ssl, I need to double configure both apps to have all the routing wired up.
What I want is a hook that says, if the app saw its comms come in from SSL, then use this SSL config but otherwise be normal.
— Reply to this email directly or view it on GitHubhttps://github.com/ql-io/cluster2/issues/34#issuecomment-14319249 .
Not obvious how to SSL-ize an express connection. Any tips?