FAQ

Kitex Framework

Q: Does Kitex support Windows?

  • Currently Windows is not particularly supported by Kitex.
  • If your development environment is Windows, you are suggested to use WSL2.

Q: Does Kitex support HTTP?

  • Kitex does not specifically provide HTTP request support, CloudWeGo is expected to open source HTTP framework “Hertz” in the first half of 2022.
  • For API gateway scenario, Kitex provides a HTTP mapping generic call regarding Thrift and sends the Thrift encoding of the HTTP request to the server.

Q: How to configure multiplexing?

  • If you are using Thrift or Kitex Protobuf, to configure multiplexing:
    1. Configure WithMuxTransport() on your server.
    2. Configure WithMuxConnection(1) on your client
  • If you are using gRPC, multiplexing is configured by default.

Q: In the scenario of direct local call, why does the configuration of connection pool not take effect?

  • The ip of your local test needs to be 127.0.0.1. For example, “client.WithHostPorts(“127.0.0.1:8888”)”.

Q: What are the differences between “Kitex Protobuf” and “gRPC” protocol?

  • Kitex Protobuf is a Protobuf Message Protocol defined by Kitex framework, with similar structure to Thrift.
  • gRPC provides support to gRPC message protocol and enables Kitex to interact with gRPC framework.

Q: Issues regarding Thrift interface compiling, such as “not enough arguments in call to iprot.ReadStructBegin”

  • Based on Thrift v0.13, Kitex cannot be upgraded directly, as there is a breaking change in the interface of Apache Thrift v0.14. The reason for such problems could be that a new version of Thrift is pulled during upgrades. The use of -u parameters is not recommended during upgrades, you can run the following command to fix the version: “go mod edit -replace github.com/apache/thrift=github.com/apache/thrift@v0.13.0

Kitex Code Generation Tool

Q:‘not enough arguments’ problem when installing the code generation tool

  • Please try: “go mod:GO111MODULE=on go get github.com/cloudwego/kitex/tool/cmd/kitex@latest”

Q: Would code generated by new interface overwrite handler.go

  • Generated code under kitex_gen/ will be overwritten. But handler.go of server will not be overwritten, only new methods will be added correspondingly.