sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.81k stars 1.17k forks source link

consumerConfig.refer() The entire process duration #718

Closed uugit closed 4 years ago

uugit commented 5 years ago

Your question

image

consumerConfig.refer() 服务消费者启动类ConsumerBootstrap引用服务 整个过程会消耗的时长很长么

我通过打log 发现这个过程 消耗3s 多 , 如果类似于图中 SampleService 有多个Service , 在调用这个refer方法时, 是不是有点久

Your scenes

Your advice

Environment

sofastack-bot[bot] commented 5 years ago

Hi @uugit, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.

We encourage you to describe your issue in English which is more friendly to other users.

Your question image consumerConfig.refer() Service Consumer Startup Class ConsumerBootstrap Reference The whole process of the service will take a long time. I found that this process consumes more than 3s by logging. If there are multiple Service similar to the SampleService in the figure, it is a bit long when calling this refer method### Your scenes ## # Your advice ### Environment - SOFARPC version: sofarpc -5.5.1 - JVM version (eg java -version): jdk10 - OS version (eg uname -a): mac - Maven version: 3.3.3 - IDE version: 2019.1

ujjboy commented 5 years ago

@uugit 如果服务端有很多服务端,目前是会去并发全部建连。你日志里有建连超时的场景吗?

uugit commented 5 years ago

目前只是在起服务的时候发现时间很长, 要等好久, 查了一下, 结果是在rpc refer 这个块比较耗时 , 我们有多个service ,一个service要3s , 所以咨询下

leizhiyuan commented 4 years ago

如果确实有必要,可以设置addressWaitTime 为一个比较小的值。

leizhiyuan commented 4 years ago

如果还有问题,可以打开。