Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a HTTPS SSE server over Kubernetes/Ingress and Google Cloud Platform

I'm running a SSE server on a VPS and it works perfectly, no problems at all, but due to scalability reasons I needed to move it to another server.

I moved the server to Google Cloud Platform/Google Container Engine and Kubernetes/Ingress. But now I've encountered that I can't keep a SSE connection effectively, it's completely unstable and it closes connections by itself.

Is there anything special I have to do to run a SSE server over Kubernetes/Ingress?

I assume my code/software runs perfect and that is not the issue, due it works perfectly in Kubernetes, VPS, on my machine, everywhere, just not when I add the Ingress configuration, and I'm doing this because I want HTTPS over the Kubernetes load-balancer.

like image 209
Carlos C Avatar asked Sep 23 '26 11:09

Carlos C


1 Answers

Got it working by adding a long time on the timeout: 86,400 seconds. This is because it is a socket connection that needs to stay open and not a normal connection that would require less than 30 seconds to execute.

like image 142
Carlos C Avatar answered Sep 26 '26 16:09

Carlos C