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 2021/05/31 16:09:40 UTC

[GitHub] [incubator-brpc] mapleFU opened a new issue #1419: What's the best practice to using MySQL with brpc?

mapleFU opened a new issue #1419:
URL: https://github.com/apache/incubator-brpc/issues/1419


   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   
   The issue is somewhat similiar to https://github.com/apache/incubator-brpc/issues/1404 . Because mysql client may block the whole pthread, so some mysql SDK for bthread and channel is better. But currently it seems that client for MySQL is still WIP: https://github.com/apache/incubator-brpc/pull/722
   
   I wonder what's the best practice for using MySQL with brpc? Currently we create a bthread for IO, and waiting for it done or throw exceptions. But I think it may block too many pthread, and make the program hangs on MySQL IO.
   
   I find there is an third party MySQL client: https://github.com/apache/incubator-brpc/issues/1404 . Is using that a best practice now?
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   
   Having an official MySQL client.
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   Telling the user that what's the best practice for using MySQL client in brpc.
   
   
   **Additional context/screenshots (更多上下文/截图)**
   
   none
   
   


-- 
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.

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] yz1509 commented on issue #1419: What's the best practice to using MySQL with brpc?

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


   我们线上也遇到这个问题,sql 的慢查询会影响同进程内的 redis 访问,是使用粗暴的加大 worker 数量来应对 = =
   
   [关于在bthread里调用网络操作的问题](https://github.com/apache/incubator-brpc/issues/194)
   [若有大量的bthread调用了阻塞的pthread或系统函数,会影响RPC运行么](https://github.com/apache/incubator-brpc/blob/master/docs/cn/bthread.md#q%E8%8B%A5%E6%9C%89%E5%A4%A7%E9%87%8F%E7%9A%84bthread%E8%B0%83%E7%94%A8%E4%BA%86%E9%98%BB%E5%A1%9E%E7%9A%84pthread%E6%88%96%E7%B3%BB%E7%BB%9F%E5%87%BD%E6%95%B0%E4%BC%9A%E5%BD%B1%E5%93%8Drpc%E8%BF%90%E8%A1%8C%E4%B9%88)


-- 
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.

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] yz1509 commented on issue #1419: What's the best practice to using MySQL with brpc?

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


   @mapleFU 确实只有 redis client 是基于 `CallMethod` 重写了,我们线上使用的是框架组自己封装的 MySQL client


-- 
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.

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] mapleFU commented on issue #1419: What's the best practice to using MySQL with brpc?

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


   @yz1509 Seems brpc has official redis client, but no MySQL client...


-- 
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.

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] mapleFU commented on issue #1419: What's the best practice to using MySQL with brpc?

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


   @yz1509 Currently we using a pthread pool and using the blocking client to visit. Seems that you are using libco to hook the IO?


-- 
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.

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] yz1509 commented on issue #1419: What's the best practice to using MySQL with brpc?

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


   @mapleFU 框架组那边貌似是这么干的,具体细节我也不太清楚 = =


-- 
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.

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