【发布时间】:2021-01-08 02:08:38
【问题描述】:
我想要
- 用 Java 编写我的后端代码,
- 使用HTTP/2(NGINX 1.9.5已经支持HTTP/2),
- 编写双向流,随时在客户端和服务器之间发送数据。
gRPC 似乎是最好的选择,我想使用 NGINX 作为我的反向代理和负载平衡,我找不到任何文档来弄清楚如何使用 NGINX使用 gRPC Java,有人知道吗?
我看到gRPC PHP已经支持NGINX了:https://github.com/grpc/grpc/tree/master/src/php#use-the-grpc-php-extension-with-nginxphp-fpm
但是我也看到有an issue说它正在提交NGINX中的第3方模块以支持gRPC,而NGINX上有a ticket表示我们不能编写HTTP/2 NGINX代理模块对于gRPC,我也看到nginx does not support the full HTTP/2 specs, gRPC does not work through it
我对此感到困惑,为什么有些帖子说 gRPC PHP 可以工作,而在其他帖子中却说不能。
【问题讨论】:
-
gRPC 已在 1.13.10 中添加给感兴趣的用户:nginx.com/blog/nginx-1-13-10-grpc
标签: nginx proxy grpc grpc-java