You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/06/16 06:27:07 UTC

[GitHub] [incubator-brpc] dandyhuang opened a new issue, #1798: client同步访问和异步访问性能

dandyhuang opened a new issue, #1798:
URL: https://github.com/apache/incubator-brpc/issues/1798

   请教一下,如果现在有一个场景需要A->B->C。 数据之间都有依赖关系。如果我使用[同步访问](https://github.com/apache/incubator-brpc/blob/master/docs/cn/client.md#%E5%90%8C%E6%AD%A5%E8%AE%BF%E9%97%AE)并且整个链路每次请求,已经使用bthread在等待处理了, 不会影响其他业务的请求。 但是不清楚性能相较于异步访问。性能是不是没有很大差别呢。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] serverglen commented on issue #1798: client同步访问和异步访问性能

Posted by GitBox <gi...@apache.org>.
serverglen commented on issue #1798:
URL: https://github.com/apache/incubator-brpc/issues/1798#issuecomment-1158397718

   我理解如果A->B->C之间业务层的逻辑很薄,同步和异步的方式应该差别不大;业务逻辑重的话,建议还是用异步访问;
   另外:建议最好根据业务场景实际测试下,好做选择。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] dandyhuang commented on issue #1798: client同步访问和异步访问性能

Posted by GitBox <gi...@apache.org>.
dandyhuang commented on issue #1798:
URL: https://github.com/apache/incubator-brpc/issues/1798#issuecomment-1158440539

   > 我理解如果A->B->C之间业务层的逻辑很薄,同步和异步的方式应该差别不大;业务逻辑重的话,建议还是用异步访问; 另外:建议最好根据业务场景实际测试下,好做选择。
   
   业务逻辑重没理解,指的是包大小吗。 重跟同步异步没有太大关系吧。 只是看你有没有分包,并行的请求吧。验证看了一下线上,同步和异步基本上耗时差不多


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] TousakaRin commented on issue #1798: client同步访问和异步访问性能

Posted by GitBox <gi...@apache.org>.
TousakaRin commented on issue #1798:
URL: https://github.com/apache/incubator-brpc/issues/1798#issuecomment-1160080640

   串行请求的话同步和异步没什么区别,同步的方式其实就是在Callmethod里加了一个join,同步的方式请求可以直接使用栈内存减少malloc次数


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] dandyhuang commented on issue #1798: client同步访问和异步访问性能

Posted by GitBox <gi...@apache.org>.
dandyhuang commented on issue #1798:
URL: https://github.com/apache/incubator-brpc/issues/1798#issuecomment-1160095517

   > 串行请求的话同步和异步没什么区别,同步的方式其实就是在Callmethod里加了一个join,同步的方式请求可以直接使用栈内存减少malloc次数
   
   好的,多谢,我在观察观察


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] TousakaRin closed issue #1798: client同步访问和异步访问性能

Posted by GitBox <gi...@apache.org>.
TousakaRin closed issue #1798: client同步访问和异步访问性能
URL: https://github.com/apache/incubator-brpc/issues/1798


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org