google-cloud-dotnet icon indicating copy to clipboard operation
google-cloud-dotnet copied to clipboard

Pub Sub Client and firewalls

Open automada opened this issue 9 years ago • 4 comments

Are there any special network considerations when using the pub sub dotnet client?

I'm using the latest dotnet clients for pub sub and storage. With the storage client (e.g. StorageClient.UploadObject) all goes well on the company LAN, but with the pub sub client, the methods just hangs (e.g. PublisherClient.Publish). No traffic is seen in Fiddler, and it eventually times out.

If I invoke the pub sub REST API through Postman it works fine. If I use the pub sub client outside the company LAN it works fine.

automada avatar Feb 01 '17 09:02 automada

StorageClient uses HTTP/1.1, whereas PublisherClient uses gRPC, which uses HTTP/2.0 as the transport. My guess is that your company is running a proxy which can cope with HTTP/1.1 but not HTTP/2.0.

Rather than using Fiddler (which may also not handle HTTP/2.0 properly), try using Wireshark and you should see the attempt to connect.

jskeet avatar Feb 01 '17 09:02 jskeet

Thanks! I will check what our proxy supports, but I suspect you are right (even if I couldn't see any http/2 traffic in Wireshark - but that is most likely an end-user issue issue) . Do you know if these clients will align towards the same plumbing in the near future? Can I expect StorageClient to move over to gRPC or the other way around (if that makes any sense)?

automada avatar Feb 01 '17 11:02 automada

The current Storage and BigQuery packages will always use HTTP/1.1 as that's all that's supported at the moment. If and when those APIs are exposed over gRPC, we will create new packages (using the same codegen used for Datastore, Logging, Monitoring, Speech, Vision etc) at that point. I'd expect that to be in a package called Google.Storage.V2 or similar - it will not just be a version number update in the existing package. (The "V1" in Google.Storage.V1 is part of the package name itself, and is in the namespace.)

jskeet avatar Feb 01 '17 11:02 jskeet

Thanks for the clarifications! I found out that our proxy should support http/2, and I can see that http/2 (or h2) is used as a protocol (in chrome dev tools) when pointing to google.com. I guess it must be blocked somewhere else. I'll close this one of since it most likely is an infrastructure issue. Thanks for the quick response!

automada avatar Feb 01 '17 12:02 automada