title: Flask-socketIO on Elasticbeanstalk
body: <p>On 25 October 2018 Miguel Grimberg the author of Flask-socketIO answered <a href="https://stackoverflow.com/questions/52756046/deploy-flask-socketio-on-beanstalk">this way</a> about Flask-socketIO on Elasticbeanstalk.</p>
  
  <p>Now a year later I'm trying to do it with an app deployed on EB Python 2.7 but I can't make it work.</p>
  
  <p>Miguel expressed doubts about EB not using eventlet web servers and actually I think Apache doesn't support eventlet.</p>
  
  <p>Somwhere else Miguel expressed doubts about EB being multithreads but I notice that in my environment configuration there is the number of threads (NumThreads: 15).</p>
  
  <p>I also found <a href="https://github.com/awsdocs/elastic-beanstalk-samples/blob/master/configuration-files/aws-provided/instance-configuration/websockets/python/websockets-python.config" rel="nofollow noreferrer">this solution</a> for web sockets with Python and Apache (apparentely) released by AWS but I can't make it work (I actually tried with port=5000 is it right?).</p>
  
  <p>A solution quite popular on the Internet is even this:</p>
  
  <pre><code>container_commands:
  
  enable_websockets:
      command: |
       sed -i '/\s*proxy_set_header\s*Connection/c \
                proxy_set_header Upgrade $http_upgrade;\
                proxy_set_header Connection "upgrade";\
        ' /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf
  </code></pre>
  
  <p>but it doesn't seem directly relevant to the default Python EB platform with Apache web server.</p>
  
  <p>So is somebody using Flask-socketIO on an EB environment and if so could she please share configuration?</p>