The easiest way would be to use a common IaaS (infrastructure as a service) cloud service provider such as Amazon EC2 or Rackspace. Or just use a regular hosting server, for example, with Dreamhost. With them, you get direct access to the OS and network settings, and you can do whatever you want. The disadvantage is that it will be more expensive, and for EC2 and Rackspace you will need to manage the host itself.
Refresh . Now you can use Websockets on Heroku. Here is some information on using Websockets with Python on Heroku .
source share