Coder Social home page Coder Social logo

Comments (14)

cusspvz avatar cusspvz commented on September 16, 2024

Hi @ngzhongcai

I am trying to deploy for Socket.io running HTTPS behind AWS ELB.

Was discovered by @AbdelMat-CP on issue #9 that are some implementation problems with https when running on top of node 0.12.2.

To isolate that problem we must first complete https tests support, if you could help us, it would be awesome!

Currently my timespan for side projects is very narrow, so i could not complete it on the next days.

ATM, we are also using https with AWS ELB, but for performance proposes, we let the https handling on AWS ELB endpoint.
If you want to workaround this problem, you could configure AWS ELB like 80 http -> 3000 http, 443 https -> 3000 http and keep http on instance nodes.

from proxywrap.

cusspvz avatar cusspvz commented on September 16, 2024

Gonna let this issue opened so we can track in case this incident is different.

from proxywrap.

ngzhongcai-zz avatar ngzhongcai-zz commented on September 16, 2024

Am running on 10.36.
Can I say that I have deployed the script correctly.

from proxywrap.

cusspvz avatar cusspvz commented on September 16, 2024

Just remembered that AWS ELB has a problem with Socket.IO, have you configured AWS ELB with http or tcp?

from proxywrap.

ngzhongcai-zz avatar ngzhongcai-zz commented on September 16, 2024

Thanks for the tip! I will try terminating at elb later

from proxywrap.

ngzhongcai-zz avatar ngzhongcai-zz commented on September 16, 2024

Doing it as TCP

from proxywrap.

cusspvz avatar cusspvz commented on September 16, 2024

Please try ELB as stcp -> tcp and use require( 'http' ) on your app instead.

from proxywrap.

cusspvz avatar cusspvz commented on September 16, 2024

You could want to redirect entire requests from http to https, for that you should detect which port is being accessed on ELB (through socket.proxyPort) and redirect in case it isn't 443.

from proxywrap.

cusspvz avatar cusspvz commented on September 16, 2024

Solved?

from proxywrap.

ngzhongcai-zz avatar ngzhongcai-zz commented on September 16, 2024

Nope. Not exactly. Sorry that I closed the issue unilaterally.

I made a few changes to my setup.

  1. Like what you suggested, I let it terminate at the load balancer to get more performance
  2. Instead of using Socket.io, I am now using WS Websocket only. https://github.com/websockets/ws

Tried to deploy WS server on top of ProxyWrap, but was unable to get it working. Turns out that you will need to suppress any remnants of ProxyProtocol strings before passing it through. Otherwise the WS server will not work.

Instead of amending on ProxyWrap, I amended the HTTP handler of WS server.

from proxywrap.

cusspvz avatar cusspvz commented on September 16, 2024

Tried to deploy WS server on top of ProxyWrap, but was unable to get it working. Turns out that you will need to suppress any remnants of ProxyProtocol strings before passing it through.

Strange, could you did something wrong? We use findhit-proxywrap on our production servers with Socket.IO and SSL support (trough ELB) without any problems.

I will remain this issue opened until we have our test suite ready for https protocol.

Thanks for reporting! :)

from proxywrap.

ngzhongcai-zz avatar ngzhongcai-zz commented on September 16, 2024

Strange... I deployed WS similar to the first chunk of codes earlier.
And like yourself, I terminated SSL at ELB.

from proxywrap.

asgoel avatar asgoel commented on September 16, 2024

@ngzhongcai am trying to get a similar setup with WS websocket behind ELB working. How did you end up modifying the WS server in order to get it to work?

from proxywrap.

cusspvz avatar cusspvz commented on September 16, 2024

Should work with v0.3.12

from proxywrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.