We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
部分服务在后端 service 500 后需要做降级处理,目前降级代码大部分嵌入下业务代码中,编写比较繁琐。http 和 gRPC 的 client 可以提供透明降级功能,并提供更多的降级选项
根据指定错误码进行降级
降级粒度到单个 API
多级降级支持
callbacb 在 client 收到指定错误码时调用预先设定的 callback 函数生成 response 内容
cache 功能,client 能够 cache 请求,收到指定错误码时返回上次成功的结果
方案一: 代码生成
生成新的 fallback client wrapper 已有的 client interface 缺点: 需要代码生成
方案二: interceptor
缺点:需要业务方知道每个 RPC method 的名称
http 实现比较简单直接拦截
The text was updated successfully, but these errors were encountered:
No branches or pull requests
背景
部分服务在后端 service 500 后需要做降级处理,目前降级代码大部分嵌入下业务代码中,编写比较繁琐。http 和 gRPC 的 client 可以提供透明降级功能,并提供更多的降级选项
功能(TBD)
根据指定错误码进行降级
降级粒度到单个 API
多级降级支持
降级选项(TBD)
callbacb 在 client 收到指定错误码时调用预先设定的 callback 函数生成 response 内容
cache 功能,client 能够 cache 请求,收到指定错误码时返回上次成功的结果
功能实现(TBD)
gRPC
方案一: 代码生成
生成新的 fallback client wrapper 已有的 client interface 缺点: 需要代码生成
方案二: interceptor
缺点:需要业务方知道每个 RPC method 的名称
http
http 实现比较简单直接拦截
The text was updated successfully, but these errors were encountered: