Skip to main content

Questions tagged [websocket]

WebSocket is an API built on top of TCP sockets and a protocol for bi-directional, full-duplex communication between client and server without the overhead of http.

Filter by
Sorted by
Tagged with
45 votes
6 answers
83k views

Configuring Apache2 to proxy WebSocket?

The WebSocket protocol is an extension of the HTTP protocol. However, the proxy module of Apache2 does not seem to know about it, and throws away crucial headers, converting the call to a standard ...
Blixt's user avatar
  • 595
16 votes
2 answers
22k views

Proxy Websockets and HTTP through the same location in Nginx

Right now there's an application that allows people to connect to a Desktop app through the web by exposing an AngularJS web server powered by Atmosphere. The Desktop app exposes the current person's ...
Jose A's user avatar
  • 263
9 votes
3 answers
17k views

Apache mod_proxy: forward secure websocket to non-secure

The websocket library I rely on (PHP-Websockets) does not yet support secure sockets (wss). My website is served over https though, so I cannot use insecure ws connections. I'm trying to use Apache's ...
BeetleJuice's user avatar
9 votes
2 answers
2k views

Scale HAProxy for more than 64k websockets

We are trying to design an architecture that will be able to handle more than 64k websockets. We first tried with Amazon ELB, but its design doesn't allow unexpected spike of traffic nor websocket. (...
Bastien974's user avatar
  • 1,916
8 votes
1 answer
11k views

ProxyPass a WebSocket connection to a UNIX socket

In Apache 2.4 you can reverse proxy an HTTP connection to a local Unix socket with: [1] ProxyPass unix:/path/to/app.sock|http://example.com/app/name You can reverse proxy a WebSocket connection to a ...
Kijewski's user avatar
  • 189
8 votes
1 answer
11k views

Nginx WebSocket reverse proxy keeps return 200 instead of 101

I'm currently trying to have a hack.chat on my personal server working. Long story short, it consists of two servers. The first is a simple httpd server serving javascript and CSS. The second one, ...
axellink's user avatar
7 votes
1 answer
14k views

How to handle 1M websocket connections (Nginx/HAProxy/Amazon/Google) [duplicate]

What nginx or haproxy setup is suggested for target 100K concurrent websocket connections? What I think, a single nginx will not be able to take such traffic as well as concurrent connections. How ...
Ravi Kumar's user avatar
7 votes
1 answer
12k views

ws protocol and apache mod_proxy_wstunnel configuration: error 500

I got an error 500 when trying to access to ws://localhost:8080/ via my Apache2 server. This server runs OpenSuse Leap 42.1 and Apache 2.4.16. These Apache2 modules are enabled: mod_proxy, ...
jack-y's user avatar
  • 171
6 votes
2 answers
12k views

Proxying websocket traffic from nginx 1.3.13 to socket.io (without SSL)

As of 2 days ago, nginx started to support websocket connections, therefore I was trying to get my nginx-nodejs-socket.io application to work without HAproxy ect (not much luck though). What I want ...
Skeptic's user avatar
  • 191
6 votes
1 answer
9k views

HA Proxy and Websockets

I'm setting up my first HAProxy reverse proxy server. It's going to be a proxy for an HTML5 app running on tomcat from a different server. I was able to get it to proxy out via HTTP, redirect all ...
JoeInVT's user avatar
  • 95
6 votes
2 answers
15k views

Kubernetes Ingress: How can I expose two ports on one path?

I have a GCE Ingress configured and working with SSL on port 443. I'm trying to get port 28080 pointing to my standalone actionable server. I currently have this for my Ingress yaml: # web-ingress....
Archonic's user avatar
  • 394
5 votes
1 answer
3k views

Nginx reverse proxy + URL rewrite + websockets

I saw this Question, but it doesn't seem to work for me. Current (working) situation is: server { listen 443 ssl; server_name updates.example.com; ssl_certificate fullchain.pem; ...
ZioByte's user avatar
  • 296
5 votes
1 answer
3k views

Nginx proxy websocket: is it required to close the connection to backend after upgrading to a websocket?

Base on what I could read on nginx site https://www.nginx.com/blog/websocket-nginx/ The exemple they give will close all connections to backend. This isn't really what we want on a proxy setup, ...
Antony Gibbs's user avatar
4 votes
1 answer
14k views

nginx setup for wss:// keep getting 301 redirects

Can't get wss:// (or ws://) working on my Digital Ocean, Ubuntu server using nginx, keep getting 301 redirect and no connection. Websocket server: node + express + uws served on http://localhost:...
Michael Dausmann's user avatar
4 votes
1 answer
8k views

NGINX double proxy not allowing websocket connections

I have two nginx proxies setup on my machine, one to unwrapp SSL and the other to do application-specific proxying (only the second one is version controlled). When I only had one proxy I was able to ...
Simon Richard's user avatar
4 votes
1 answer
3k views

Add proxy headers in named location using nested location regex

I'm trying to setup a WebSocket endpoint on my Rails API using Nginx and Puma. What I have (working but ugly) The following Nginx configuration works fine, however I feel like I could use something ...
Habovh's user avatar
  • 271
4 votes
1 answer
9k views

Nginx: proxy_set_header "Upgrade" slows down the server

I have a site that I'd like to enhance with using WebSocket based features. The site is behind an Nginx reverse proxy. My config for the server looks like this: location / { ...
László Stahorszki's user avatar
4 votes
1 answer
4k views

Unable to get websockets to work through apache HTTPS proxy (302 error)

I'm unable to make websockets work on a node backend using an apache proxy through HTTPS to connect to the node instance. Websockets are working properly if no (apache) http(s) proxy is used. My ...
Digital Leaves's user avatar
4 votes
1 answer
2k views

TeamCity, nginx, and Websockets - 501 Error

I'm currently setting up TeamCity behind an nginx reverse proxy, but I am getting an error in my browser. The error is as follows: WebSocket connection to 'ws://ci.example.net/app/subscriptions?X-...
mattrick's user avatar
  • 143
4 votes
1 answer
2k views

Application layer firewall for WebSockets?

My team has built an intranet portal in Amazon AWS for a client, and on it, we have used WebSockets to do things like notifications and other minor stuff. We mostly send events from the server, but we ...
Mike Caron's user avatar
4 votes
0 answers
590 views

Heroku and socket.io out of memory

I have a setup with websockets on heroku and every now and then i get a flurry of messages like this: 06:24.591694+00:00 heroku router - - at=error code=H15 desc="Idle connection" method=GET path="/...
Henric Malmberg's user avatar
4 votes
0 answers
3k views

Is websocket reverse proxy possible with IIS 8.5 & URL rewrite 2.0?

I installed Tomcat as a java app server behind IIS. Using the following rules I can rewrite static pages just fine, but alas, websocket connections are never established: <?xml version="1.0" ...
Mirco's user avatar
  • 53
3 votes
2 answers
14k views

Apache 2.4.7 mod_proxy_wstunnel tunneling too much (HTTP as well as WS)

I'm running Apache 2.4.7 as a reverse proxy on Ubuntu 14.04 LTS. This Apache server acts as the entrypoint to a lot of different backend applications, which are accessed via different mod_proxy ...
Brian Beckett's user avatar
3 votes
1 answer
8k views

No protocol handler was valid for the URL / (scheme 'ws')

Trying to setup a websocket proxy using apache2, I get the following error: No protocol handler was valid for the URL / (scheme 'ws'). If you are using a DSO version of mod_proxy, make sure the proxy ...
Mohsen Saberi's user avatar
3 votes
1 answer
9k views

Increase client timeout for WebSocket connections to certain URL

On CentOS 7 Linux I successfully use HAProxy 1.5.14 in front of Jetty 9 serving a Wordpress site via FastCGI. It works really well, but for a HTML5/WebSocket game at the same website much higher ...
Alexander Farber's user avatar
3 votes
1 answer
15k views

How to troubleshoot Nginx 499 when it's not returning a web sockets handshake back to the client?

In a Kubernetes cluster, I have an Nginx server acting like a reverse proxy / TLS termination solution that proxypass requests to a backend Tomcat application that has some functionalities powered by ...
theMarceloR's user avatar
3 votes
1 answer
16k views

NGINX Proxy Setup for ws:// protocol

I am trying to setup NGINX to proxy web socket traffic. I am running a web page on NGINX (port 80) that has an MJPEG feed from port 8080 and also takes web socket traffic over port 8090. I can proxy ...
user383341's user avatar
3 votes
1 answer
4k views

An Issue with an AWS EC2 instance when connecting it to WebSocket

As I tried to run the chat app from localhost connected to MySQL database which had been coded with PHP via WebSocket it was successful. Also when I tried to run from the PuTTY terminal logged into ...
Nɪsʜᴀɴᴛʜ ॐ's user avatar
3 votes
1 answer
6k views

Error 404 when connecting to websocket behind nginx proxy_pass

I would like to serve up a websocket behind a location on my webserver. For example, if my domain is http://mydomain I would like my websocket to be available at ws://mydomain/ws. I am running a ...
Justin Gilman's user avatar
3 votes
1 answer
2k views

How to configure streamlit to serve an app to www?

streamlit app is running in a centOS stream 8 virtual machine. Access from intranet is fine but fails with "streamlit please wait.. page" when accessed from www via subDomain.companyDomain....
384X21's user avatar
  • 131
3 votes
0 answers
870 views

NGINX Websocket initial communication delay

I've created a Django server that is making use of django-channels for websocket communication. When I run the server with NGINX there is an initial delay in websocket communication between the server ...
MCBama's user avatar
  • 131
3 votes
0 answers
577 views

Confluence (Synchrony) using websockets behind IIS8 can't copy or insert large blocks of text

I've got a Confluence 6.1.0 setup running behind an IIS8 reverse proxy doing SSL. Everything works except for one small problem. When I try to copy a three or four paragraphs of text, attempt to ...
meeper's user avatar
  • 43
3 votes
2 answers
2k views

nginx as proxy for WebSocket: inspect and block certain requests

I ran NodeJS as a kind of Webapplication Server serving an AngularJS frontend. They communicate solely over WebSockets, using the SailsJS implementation of Socket.IO. Between frontend (client) and the ...
cis's user avatar
  • 247
3 votes
1 answer
3k views

WSS Load Balancing with SSL Termination at layer 4

Should it be possible to terminate SSL for wss (secure websockets) at a layer 4 load balancer? Seems to me that wss (and ws) in general would require TCP routing since an HTTP reverse proxy wouldn't ...
rbinion's user avatar
  • 31
3 votes
1 answer
2k views

nginx proxy_pass two ports into subfolders

So I had my last "reverse proxy" problem fixed regarding "mapping" a port to a subfolder Thanks again to this awesome community. I have been able to work with this solution for a while but now I am ...
pAt84's user avatar
  • 311
2 votes
1 answer
17k views

Web app can't connect to websocket server

I have a web app running on HTTP server on port 3000. This app is connected to a websocket server on port 9001. Both WS and HTTP servers are located inside the same VM. When testing the app locally (...
Max Mikhaylov's user avatar
2 votes
2 answers
3k views

NGINX Proxy pass to WebSocket and PHP not working with SSL

I'm trying to route requests in Nginx in the following way: Requests made to / should go to a PHP script (proxy.php, which itself is a proxy) Requests made to /websocket should be proxied to http://...
Rico Leuthold's user avatar
2 votes
2 answers
3k views

Apache Cluster + Tomcat websocket

We've recently configured a new Cluster with the following configuration: www.mydomain.com | APACHE + MOD_JK (AJP) Load Balancer / \ Tomcat1 ...
Medioman92's user avatar
2 votes
1 answer
7k views

Apache2 WSS-rewrite

Trying my luck her as StackOverflow was not the right place to ask. Hopefully this is where my question belongs! I have been pulling my hair the last few days getting websockets to work with Apache2....
Erik's user avatar
  • 21
2 votes
1 answer
4k views

How does nginx websocket proxy work?

I'm wondered about how nginx handles tons active websocket connections? There is a lot of limitations, like a number of open files, maximum of 65k TCP connections between IP <-> (IP, port) and so ...
Ivan Velichko's user avatar
2 votes
2 answers
7k views

HTTP and websocket on the same port and domain behind reverse proxy

I wanted to try Node-Red and have installed it on my Ubuntu server. This server runs an apache reverse proxy but I can't get it to work right. If I create a virtualhost for the HTTP connection I can ...
screendoor's user avatar
2 votes
3 answers
1k views

IP Tables intercept exception

I've got a set of iptable rules that look like this: -A PREROUTING --jump intercept-nat -A intercept-nat --jump DNAT -s 10.10.1.0/24 ! -d 10.10.1.1/32 -p tcp -m tcp --dport 80 --to-destination 10.10....
Erik Petersen's user avatar
2 votes
2 answers
1k views

WebSocket Connection vs. Repeated GETs

I am prototyping an application using nodejs. But this question refers to hypothetical large scale roll out. What is more demanding on a server and/or bandwidth: WebSocket stay alive connections or ...
Ross's user avatar
  • 153
2 votes
1 answer
5k views

Nginx timeout for websocket

I'm connecting a client with websocket through Nginx (as a reverse proxy) to an asp.net core application. Between server and client there are heartbeat commands to keep websocket connection open. My ...
Mathias's user avatar
  • 121
2 votes
1 answer
5k views

How to accept HTTPS and Websockets on a new Google Kubernetes Engine deployment?

I set up a simple 1-node GKE deployment with the default (beta) ingress, created via the GCP console. I would like to set up a Google-managed SSL certificate and HTTPS proxy to the a single GKE node &...
Matthew's user avatar
  • 21
2 votes
2 answers
7k views

Cannot get websocket connection working with ec2 + application load balancer

I have an aws application load balancer with an https listener on port 9999, forwarding to a group on port 9999 with an ec2-instance being the target. If I run my websocket server with the host name ...
patrick's user avatar
  • 153
2 votes
1 answer
2k views

Enabling WebSockets (SignalR) with a Barracuda WAF

I am currently tearing my hair out at work trying to resolve an issue with a web application that uses SignalR over WebSockets where traffic is directed through a Barracuda Web Application Firewall (...
jonhoare's user avatar
  • 201
2 votes
1 answer
1k views

Does Apache process handling Websocket proxy also serve same client for http?

In choosing to adopt Websocket as the real-time technology behind a web application for my company, I'm trying to determine what the server workload will be. So far as I understand Apache internals, ...
B. Lawson's user avatar
2 votes
1 answer
3k views

Allow Websocket connections on Google Cloud Platform

We have a GCE project, with several servers behind a loadbalancer. The servers are running a NodeJS HTTPS server. We have recently tried to implement websocket support, but can't seem to connect to it ...
Nils Eijk's user avatar
2 votes
1 answer
1k views

Proxy websocket with parameters through proxypass/proxypassmatch without a VirtualHost

I have been trying for the longest time to proxy a websocket with it's sid variable to the localhost service, that is serving it. I have looked far and beyond for a solution (including a lot of the ...
smsimeon's user avatar

1
2 3 4 5