1
votes

I have an existing application that I was trying to deploy it to google cloud run, but the application can't connect to an external NATS services. It seems that cloud run only supports http, websockets, and gRPC for outbound connections and traffic. It doesn't seem that an application can make a pure TCP/IP connection with binary data from a cloud run application.

Just looking for someone to confirm this. I have not been able to find any documentations that explicitly states the inbound and outbound limitations of cloud run.

Note: my app can connect to REDIS though. Thank you for your help.

3
I did get it working, I had two issues. The first was I deployed the nats image and not the nats-streaming image, and the second issue was the nats-streaming container needed to be in the same VPC as the cloud run app and then it worked. So you can connect to a NATS server from a Cloud Run App. - Rob Kreger

3 Answers

1
votes

Yes according with this document, Cloud Run just support HTTP, WebSockets and gRPC by the moment, also here is pointed the http requests not supported, I suggest you create a feature request, if the petition earns enough people popularity this feature can be added to Cloud Run

1
votes

There's no outbound protocol limitation.

In terms of inbound, Cloud Run only supports HTTP/1 and HTTP/2 (which includes gRPC) over TLS (HTTPS). That said, server-streaming is not supported (e.g. websockets or streaming gRPC calls).

Therefore, you cannot serve with arbitrary TCP wire protocols on Cloud Run.

0
votes

From https://cloud.google.com/run/docs/issues:

Cloud Run (fully managed) currently does not support HTTP streaming. Therefore, inbound requests with protocols like WebSockets and gRPC streaming are not supported.

Cloud Run (fully managed) services support unary gRPC.

For outbound requests, both WebSockets and gRPC are supported.