Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am currently using Amazon EC2 and running a Node.js application, however the HTTPS handshake etc. is now becomming a bottleneck, so I was wondering if this is possible:

  • 2 EC2 instances running Node.js (Rest JSON Api) on HTTP port 80
  • Elastic Load Balancer routes all traffic (https) from port 443, and encrypted etc. to http port 80

This would greatly increase my performance of my EC2 node.js server, and everything will still be secure since only the load balancer is accessable from the internet and the EC2 instances will be running privately.

Thanks for help

share|improve this question

2 Answers 2

You can do this. We do it with Tomcat in production. Setup two listeners on the ELB: one which maps 80 to 80 and another that maps 443 to 80. You'll need to provide an SSL cert for the HTTPS listener, too.

There's really nothing offputting or odd about this configuration. As long as your app can handle both types of requests on 80, it'll work just fine. It'll also come with the added advantage of allowing your instances to autoscale, if you so desire.

share|improve this answer

I'm no EC2 expert but many people use that exact model in other systems, for instance we use Riverbed's 'Stingray' (used to be Zeus ZXTM) to do a very similar thing. Give it a try, what's the worst that could happen?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.