You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/08/09 10:23:02 UTC

[GitHub] haiyang1985 opened a new issue #2224: Any better solutions for http request

haiyang1985 opened a new issue #2224: Any better solutions for http request
URL: https://github.com/apache/incubator-dubbo/issues/2224
 
 
   - [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
   - [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: xxx
   * Operating System version: xxx
   * Java version: xxx
   
   ### Http Request Solutions
   
   We are going to export dubbo service for front-end request(eg: h5 outside). We are doubt about the advantage and disadvantage of below two solutions, anyone have good ideas for that?
   
   Generally, there are two ways to support that. 
   Solution1: Add proxy(through GenericService) for the http request (http -> proxy -> dubbo)
   Solution2: Support dubbo & http protocol in service side (eg: dubbox/jsonrpc).
   
   ## For Solution1:
   # Advantage:
   1. It's easy for the user, no need to maintain both http & dubbo protocols.
   2. No need to maintain two types of configurations (one for dubbo, another for http). Following two conditions may confuse the user. Firstly, xxx config support for dubbo and http, but they are in different key. Secondly, yyy config is supported in dubbo, not for http. User maybe confused on so much of the configs.
   
   # Disadvantage:
   1. The latency is high for the proxy mode. 
   For dubbo protocol:  1k request/100k response/3000QPS, average response is 1-2ms, and able to support 7000-8000QPS in 8Core server.
   For the proxy mode: 1K request/100K response/600QPS, the average response is 14ms, only with 600QPS.
   2. The proxy CPU is very high.
   For dubbo protocol: With 7000-8000QPS, the service CPU is about 80-90%, with 600QPS, the service CPU below 5-10% maybe.
   For proxy mode: With 600QPS, service CPU is low, but the proxy's CPU is almost full (80-90%). That means, it need 4-5times of the server to host the request.
   
   ## For Solution2:
   # Advantage:
   1. The latency is very low, as it's directly connect to the service.
   # Disadvantage:
   1. User have to maintain both dubbo & http protocol, as described in solution 1 . 
   
   We are confused to find a better solution. Am i in a wrong way, or anyone have good suggestions or solutions for http request?
   
   Thanks for any suggestions.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org