-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
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
sofa server是否支持异步处理请求 #173
Comments
我的理解:
1.
每个请求要通过http调用第三方服务,从你的描述来看,使用的是同步调用,平均响应时间是50ms;这段时间工作线程是被阻塞的;因此你的计算没有问题,qps极限为
work_count * (1 / http_delay);对于同步调用来说,除了增加线程数,没有别的办法;
2.
要提高吞吐,且不依赖于工作线程数,那就要用http的异步调用;但是这里的异步调用与sofa-pbrpc框架本身已经没有什么关系了,只不过异步调用动作是在sofa-pbrpc的工作线程中发起的;
3. 那么你需要的就是:找一个异步的http库。
2016-12-27 18:00 GMT+08:00 BP <notifications@github.com>:
… 业务场景如下:server端对每个请求都需要通过http调用第三方服务,平均响应时间为50ms
如果server端线程数设置为1的话是否qps极限约为20,server端线程数设置为32的话,qps极限约为32 * 20?
sofa是否有某种机制对每个请求进行异步处理,不阻塞当前工作线程的执行?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#173>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAgQPd4zk6A4d0uX3EFQ-S3q_3QkmqKSks5rMOHagaJpZM4LWKoa>
.
|
@qinzuoyan |
听你的描述 觉得和sofa server已经没有关系了 系统吞吐取决于第三方的http服务 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
业务场景如下:server端对每个请求都需要通过http调用第三方服务,平均响应时间为50ms
如果server端线程数设置为1的话是否qps极限约为20,server端线程数设置为32的话,qps极限约为32 * 20?
sofa是否有某种机制对每个请求进行异步处理,不阻塞当前工作线程的执行?
The text was updated successfully, but these errors were encountered: