GRPC如何在Cloud Foundry中工作?GoRouter不支持HTTP2 [英] How does GRPC work in Cloud Foundry? GoRouter doesn't support HTTP2

查看:76
本文介绍了GRPC如何在Cloud Foundry中工作?GoRouter不支持HTTP2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用GRPC在2个微服务之间进行相互通信.但是默认情况下,云铸造厂使用不支持Http2的Go路由器.并且默认情况下,许多Cloud Foundry安装都不会公开TCP端口本身.是否有任何变通办法或支持此方案的界面?

I need to use GRPC for inter communication between 2 micro services. But by default, cloud foundry use Go router that doesn't support Http2. And by default, many of cloud foundry installation doesn't expose TCP port itself. Is there any work around or is there any interface that will support this scenario?

我尝试将EUREKA与弹簧靴一起使用.它仍然使用HTTP1.1.

I have tried using EUREKA with spring boot. It still uses HTTP1.1.

推荐答案

您是正确的,Gorouter不支持HTTP/2.要使HTTP/2和/或gRPC在CF上运行,您有两个选择.

You are correct, Gorouter doesn't support HTTP/2. To make HTTP/2 and/or gRPC work on CF, you have two options.

  1. 如果需要公共客户端(即CF外部的客户端)连接到您的应用,则需要使用TCP路由.如果您的提供商默认未启用此功能,请找到其他提供商(请参见此公共提供商列表,提示Pivotal Web服务将根据请求提供TCP路由)或自托管.

  1. If you have the need for public clients (i.e.clients outside CF) to connect to your app, you need to use TCP routing. If your provider doesn't enable this by default, find another provider (see this list of public providers, hint Pivotal Web Services will provide TCP routes upon request) or self host.

如果仅需要在CF上运行的应用之间使用HTTP/2和/或gRPC,则可以使用容器到容器网络.当您将应用与应用进行对话时,没有任何限制(只要您正确打开所需的端口即可).您可以使用TCP,UDP和在它们之上构建的任何协议.此处..

If you only need to use HTTP/2 and/or gRPC between apps running on CF, you can use the container to container network. When you talk app to app, there are no restrictions (so long as you properly open required ports). You can use TCP, UDP and any protocol built on top of those. There some details about how this works here.

希望有帮助!

这篇关于GRPC如何在Cloud Foundry中工作?GoRouter不支持HTTP2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆