Skip to content

Should the HTTP Gateway be more flexible? #4819

@hide-in-code

Description

@hide-in-code

Method: strings.ToUpper(m.Method),

The code here determines that go-zero's gateway can only proxy through the Mappings set in etc/gateway.yaml, including request paths and request methods. In actual production, the number of backend service APIs continues to increase rapidly, and the request methods of backend interfaces are constantly changing. As such, when using go-zero as an HTTP gateway, this complex and cumbersome configuration will be a terrible experience. I'm wondering if the official team has more improvement plans to simplify the configuration for this part.

I hope the community can consider this request and create an HTTP gateway service that is more in line with go-zero's style and has excellent performance. Thank you.


Method: strings.ToUpper(m.Method),

这里的代码决定了go-zero的网关仅仅能通过etc/gateway.yaml中设定的Mappings进行proxy,包括请求的路径和请求方式,而实际生产中,后端服务的api个数一直在处于激增的情况,包括后端接口的请求方式也是千变万化,如此,在使用go-zero作为HTTP网关的时候,这种复杂繁琐的配置将会是一种糟糕的体验,不知道官方对于这部分内容是否有更多对于配置简化的改进计划。

希望社区可以考虑下这块诉求,并创造出更具备go-zero风格和性能优异的http网关服务,感谢

Metadata

Metadata

Assignees

Labels

area/gatewayCategorizes issue or PR as related to gateway.enhancementNew feature or requestfeatureMarks an issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions