Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6975717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:24:16+00:00 2026-05-27T17:24:16+00:00

I’m interested in setting up a Socket.IO server + Rails web application. However, as

  • 0

I’m interested in setting up a Socket.IO server + Rails web application. However, as many are aware, there are not many web servers that support WebSockets. Here have been my 2 attempts so far:

  1. I tried the Nginx-module route. Couldn’t get the combinations of compilations + configurations to get this fully working. Probably something dumb on my part.

    http://www.letseehere.com/reverse-proxy-web-sockets

  2. I tried writing my own web server with node-http-proxy but I had trouble fully integrating this with Socket.IO, despite reading all the tutorials.

    http://github.com/nodejitsu/node-http-proxy

  3. I tried writing my own web server with bouncy.js but it’s horribly slow. Could be my code, could be the framework. I have no idea.

    http://github.com/substack/bouncy

These are the things I’ve tried, and I’m just curious who else has gone down these routes and finally got something work (and of course, what they did to get it working).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:24:16+00:00Added an answer on May 27, 2026 at 5:24 pm

    As per alessioalex’s request, here’s my configuration file. I deleted all the existing comments but added a few that I, myself, would not have figured to be important.

    However, describing what all the parts of this config does is out of the scope of this post, but you can likely find the necessary documentation on the HAProxy website.

    global
        maxconn 4096 
        pidfile /var/run/haproxy.pid
    
    defaults
        mode    http
    
    frontend all
        bind 0.0.0.0:80
        mode tcp
    
        maxconn 200000
        timeout client 86400000
        default_backend www_backend
    
        # Any URL beginning with socket.io will be flagged as 'is_websocket'
        acl is_websocket path_beg /socket.io
        acl is_websocket hdr(Upgrade) -i WebSocket
        acl is_websocket hdr_beg(Host) -i ws
    
        # The connection to use if 'is_websocket' is flagged
        use_backend socket_backend_http if is_websocket
    
        tcp-request inspect-delay 500ms
        tcp-request content accept if HTTP   
    
    backend www_backend
        option httplog
        option httpclose
        balance roundrobin
        option forwardfor
        timeout server 30000
        timeout connect 4000
        server thin1 localhost:4001 weight 1 maxconn 1024 check
        server thin2 localhost:4002 weight 1 maxconn 1024 check
        server thin3 localhost:4003 weight 1 maxconn 1024 check
    
    backend socket_backend_http
        mode http
        option httplog
        option http-server-close
        option forceclose
        no option httpclose
        balance roundrobin
        option forwardfor 
        timeout queue 5000
        timeout server 86400000
        timeout connect 86400000
        timeout check 1s
        server socket1 localhost:5001 weight 1 maxconn 1024 check
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.