Comments (6)
对于dubbo自定义的http2 流控窗口逻辑有点疑惑.
复现步骤: dubbo version: 3.2.x
- 调整peer initialize window size from 8M to 64k(65535) 越小越容易复现.
- provider实现一个大数据返参接口.(如 listUser)
TriHttp2RemoteFlowController
// FlowState int writeAllocatedBytes(int allocated) { ... try { ... } finally { ... // 当connection window为0时, 此时会直接发送flow control error, 阻断连接. if(monitor.isOverFlowControl()){ logger.info(String.format("[HTTP2] connection window throttling, stream:%d overflow flow controlling", stream.id())); // cause = new Throwable(); // cancel(FLOW_CONTROL_ERROR,cause); } } return writtenBytes; }provider报:
Caused by: io.netty.handler.codec.http2.Http2Exception$StreamException: TotalPendingBytes size overflow for stream: 3
at io.netty.handler.codec.http2.Http2Exception.streamError(Http2Exception.java:153)
at org.apache.dubbo.rpc.protocol.tri.TriHttp2RemoteFlowController$ListenerWritabilityMonitor.checkConnectionThenStreamWritabilityChanged(TriHttp2RemoteFlowController.java:794)
at org.apache.dubbo.rpc.protocol.tri.TriHttp2RemoteFlowController$ListenerWritabilityMonitor.stateCancelled(TriHttp2RemoteFlowController.java:755)
... 35 common frames omitted这里很好奇, http2 官方协议并没有规定, 当 connection window为0 时 直接发送 flow_control_error. 常规做法不应该是暂停发送, 等待 窗口更新后 继续传输么?
@AlbumenJ 能否帮忙联系下作者回复下? java to java因为默认窗口设置的8M, 所以暂时未触发此异常. 但我们跨语言调用碰到了. golang那边的初始化窗口大小只有64k. 这里的逻辑, 给不到远端做窗口更新的机会.
from dubbo.
from dubbo.
@EarthChen PTAL
from dubbo.
这里其实是反压逻辑没做彻底,为了保护让consumer 中断,从而不再发请求
from dubbo.
这里其实是反压逻辑没做彻底,为了保护让consumer 中断,从而不再发请求
那我先将我们内部版本调整回netty的默认流控策略了. 现在在跨语言调用下, 实际体验并不好.
from dubbo.
这里其实是反压逻辑没做彻底,为了保护让consumer 中断,从而不再发请求
那我先将我们内部版本调整回netty的默认流控策略了. 现在在跨语言调用下, 实际体验并不好.
默认策略是放入队列等待,当 consumer 速率大于 provider 时,可能导致 oom
from dubbo.
Related Issues (20)
- [Bug] An error occurred when adding the extension dubco-metadata-report-etcd HOT 4
- [Bug] triple远程调用,连接异常重连,导致客户端阻塞直到超时 HOT 1
- [Bug] Build failed after relying on version 3.2.11 or later HOT 4
- [Bug] docker dubbo cluster broadcast not working HOT 1
- [Bug] Non-idempotent unit tests (follow-up of #14134)
- [Bug] In the example dubco-samples-spring-boot-trace-skywalking, the run fails HOT 2
- No provider available from registry RegistryDirectory(registry: 127.0.0.1:8848) HOT 1
- Dubbo 3.2 throws an error directly upon startup HOT 4
- [Bug] override url with configurator from "service-name.configurators" in interface mode not as expected HOT 10
- The matching wildcard is strict, but no declaration can be found for element 'dubbo:consumer'. HOT 1
- [Bug] enable-empty-protection default value is different between doc and code HOT 2
- [Bug] [Serialization Security] Serialized class java.lang.ArithmeticException is not in allow list. HOT 3
- [Bug] dubbo Provider列表变更通知consumer 消费端 出现NullPointerException bug HOT 1
- [Bug] java.lang.IllegalArgumentException: interface org.apache.dubbo.rpc.service.EchoService is not visible from class loader HOT 1
- [Bug] The registry uses etcd, but javaagent skywalking fails to start HOT 6
- [Bug] there are problems if mapping key only has service interface class name
- [Bug] level too large 2048 problem during serialization data by fastjson2 HOT 1
- No such extension org.apache.dubbo.rpc.Filter
- [Bug] HOT 1
- [Bug] setting dubbo.application.metadata-type at config center does not take effect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dubbo.