[GitHub] [incubator-brpc] tiankonguse edited a comment on issue #649: 支持热点情况下的一致性hash?

2019-03-26 Thread GitBox
tiankonguse edited a comment on issue #649: 支持热点情况下的一致性hash?
URL: https://github.com/apache/incubator-brpc/issues/649#issuecomment-476962335
 
 
   1. 增大虚拟节点的个数, 可以降低热点集中在一个节点的概率
   
   2. 如果某一个单Key是热点,那不管如何增加虚拟节点数,单key的热点都不可能被均摊
   
   此时有两个方法
   1. 多个一致性hash环(可能会造成资源浪费)
   2. 只有一个一致性hash环,但是环后面的节点不是对应一个实例,而是多个实例(按需给每个节点增加实例)


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] tiankonguse edited a comment on issue #649: 支持热点情况下的一致性hash?

2019-03-26 Thread GitBox
tiankonguse edited a comment on issue #649: 支持热点情况下的一致性hash?
URL: https://github.com/apache/incubator-brpc/issues/649#issuecomment-476962335
 
 
   1. 增大虚拟节点的个数, 可以降低热点集中在一个节点的概率
   
   2. 如果某一个单Key是热点,那不管如何增加虚拟节点数,单key的热点都不可能被均摊
   
   此时有两个方法
   1. 多个一致性hash环
   2. 只有一个一致性hash环,但是环后面的节点不是对应一个实例,而是多个实例


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] tiankonguse commented on issue #649: 支持热点情况下的一致性hash?

2019-03-26 Thread GitBox
tiankonguse commented on issue #649: 支持热点情况下的一致性hash?
URL: https://github.com/apache/incubator-brpc/issues/649#issuecomment-476962335
 
 
   1. 增大虚拟节点的个数, 可以降低热点集中在一个节点的概率
   
   2. 如果某一个单Key是热点,那不断如何增加虚拟节点数,单key的热点都不可能被均摊
   
   此时有两个方法
   1. 多个一致性hash环
   2. 只有一个一致性hash环,但是环后面的节点不是对应一个实例,而是多个实例


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
jamesge commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r269019674
 
 

 ##
 File path: src/brpc/socket.cpp
 ##
 @@ -92,6 +96,15 @@ DEFINE_int32(connect_timeout_as_unreachable, 3,
  "times *continuously*, the error is changed to ENETUNREACH which "
  "fails the main socket as well when this socket is pooled.");
 
+DEFINE_string(health_check_path, "", "Http path of health check call."
+"By default health check succeeds if server can be connected. If this"
+"flag is set, health check is completed not only when server can be"
+"connected but also an additional http call succeeds indicated by this"
+"flag and FLAGS_health_check_timeout_ms");
 
 Review comment:
   if server can be connected -> if the server is connectable
   
   not only...but also的意思是说hc不仅会在连接建立时完成,还会在http call成功时完成,也就是说会多次完成, 
这个并不是正确的意思吧。应该说成,If this flag is set, health check is not completed until a 
http call to the path succeeds within -health_check_timeout_ms. 
   
   让我来写我还会加句提示" (to make sure the server functions well)"
   另外一个细节是FLAGS_xxx是程序内部的说法,对于用户自然是-xxx而不是FLAGS_xxx


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
jamesge commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r269020754
 
 

 ##
 File path: src/brpc/socket.cpp
 ##
 @@ -92,6 +96,15 @@ DEFINE_int32(connect_timeout_as_unreachable, 3,
  "times *continuously*, the error is changed to ENETUNREACH which "
  "fails the main socket as well when this socket is pooled.");
 
+DEFINE_string(health_check_path, "", "Http path of health check call."
+"By default health check succeeds if server can be connected. If this"
+"flag is set, health check is completed not only when server can be"
+"connected but also an additional http call succeeds indicated by this"
+"flag and FLAGS_health_check_timeout_ms");
+DEFINE_int32(health_check_timeout_ms, 500, "Timeout of health check."
+"If FLAGS_health_check_path is empty, it means timeout of connect."
+"Otherwise it means timeout of app health check call.");
 
 Review comment:
   The timeout for both establishing the connection and the http call to 
-health_check_path over the connection


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] zyearn commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
zyearn commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r268964773
 
 

 ##
 File path: docs/cn/client.md
 ##
 @@ -242,7 +242,7 @@ locality-aware,优先选择延时低的下游,直到其延时高于其他机
 | - | - |  
| --- |
 | health_check_interval (R) | 3 | seconds between consecutive 
health-checkings | src/brpc/socket_map.cpp |
 
-一旦server被连接上,它会恢复为可用状态。如果在隔离过程中,server从命名服务中删除了,brpc也会停止连接尝试。
+在默认的配置下,一旦server被连接上,它会恢复为可用状态;brpc还提供了应用层健康检查的机制,协议是Http,只有当Server返回200时,这个server才算恢复,可以通过把-health\_check\_path设置成被检查的路径来打开这个功能(如果下游也是brpc,推荐设置成/health,服务健康的话会返回200),-health\_check\_timeout\_ms设置超时(默认500ms)。如果在隔离过程中,server从命名服务中删除了,brpc也会停止连接尝试。
 
 Review comment:
   应该是要的


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



Re: the tasklist that needed for the first apache release

2019-03-26 Thread tan zhongyi
Hi, all,

We need to assign task for our first release .
Anyone who volunteer to take ?
Here is the task list,  you can reply with it with your interested task, 
Thanks


Here is the task list:
1. Get all dependency third party’s copyright and apppend 
them to brpc License file

2. Add Notice and Disclaimer file to mention its copyright belong 
to apache foundation

3. Make a short license header, and add the header to all source 
files, including .h, .cpp, .java, etc

4. Check the source tarball to make sure it does not contain binary 
files except for data

5. Prepare release note to list all import checkin and features

6. Update Readme to add one section as “How to build”


BTW:Here is one important things about include third party code:
From its website https://apache.org/legal/resolved.html
CATEGORY X: WHAT CAN WE NOT INCLUDE IN AN ASF PROJECT?¶
Apache project forbid some third party software in it, it includes:
1. AGPL, LGPL,GPL
2. BSD + Fackbook patient
3.BSD-4-clouse




在 2019/3/19 下午3:04,“tan zhongyi” 写入:

Here is one example from Doris's RD
Doris just released its first apache version, 
The owner write a document step by step, very details

Here it is :
http://doris.apache.org/policy/release_process.html





在 2019/3/18 下午11:26,“tan zhongyi” 写入:

Hi, guys,

We  need to release our first apache release for brpc in Q2.

And it will be a great step to be an TOP level apache project for brpc.

Here is some tasks that need to be done for the release after I refer 
to document from apache.org


1. Get all dependency third party’s copyright and apppend them to 
brpc License file

2. Add Notice and Disclaimer file to mention its copyright belong 
to apache foundation

3. Make a short license header, and add the header to all source 
files, including .h, .cpp, .java, etc

4. Check the source tarball to make sure it does not contain binary 
files except for data

5. Prepare release note to list all import checkin and features

6. Update Readme to add one section as “How to build”




When we finish these tasks,  then we need to open a thread to vote on 
dev@brpc.apache.org,
If got approved,  we need to open another vote on incubator mail list.
If not approved,  we should make changes according to our mentor or 
other’s suggestion, and vote again.

I remember that it is very common to have several vote for the first 
release.

That’s all for a release, anyone have comments?
Thanks





[GitHub] [incubator-brpc] yjhjstz commented on issue #639: core文件有办法查看所有bthread的堆栈吗

2019-03-26 Thread GitBox
yjhjstz commented on issue #639: core文件有办法查看所有bthread的堆栈吗
URL: https://github.com/apache/incubator-brpc/issues/639#issuecomment-476489242
 
 
   基本思路是提供一个全局变量的入口, bthread* g; 从g以链表的方式打印各个bthread, 并读取 bthread的stack。


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
jamesge commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r268953517
 
 

 ##
 File path: src/brpc/policy/dynpart_load_balancer.cpp
 ##
 @@ -122,7 +122,8 @@ int DynPartLoadBalancer::SelectServer(const SelectIn& in, 
SelectOut* out) {
 for (size_t i = 0; i < n; ++i) {
 const SocketId id = s->server_list[i].id;
 if ((!exclusion || !ExcludedServers::IsExcluded(in.excluded, id))
-&& Socket::Address(id, [nptr].first) == 0) {
+&& Socket::Address(id, [nptr].first) == 0
+&& !(*out->ptr)->IsAppHealthCheck()) {
 
 Review comment:
   看清楚上下文。


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
jamesge commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r268953856
 
 

 ##
 File path: src/brpc/policy/randomized_load_balancer.cpp
 ##
 @@ -118,7 +118,8 @@ int RandomizedLoadBalancer::SelectServer(const SelectIn& 
in, SelectOut* out) {
 if (((i + 1) == n  // always take last chance
  || !ExcludedServers::IsExcluded(in.excluded, id))
 && Socket::Address(id, out->ptr) == 0
-&& !(*out->ptr)->IsLogOff()) {
+&& !(*out->ptr)->IsLogOff()
 
 Review comment:
   把IsLogOff全部更名为IsAvailable(),并在其中包含之前IsLogOff和IsAppHealthCheck的逻辑。


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
jamesge commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r268953327
 
 

 ##
 File path: src/brpc/controller.h
 ##
 @@ -118,6 +118,8 @@ friend int StreamCreate(StreamId*, Controller&, const 
StreamOptions*);
 friend int StreamAccept(StreamId*, Controller&, const StreamOptions*);
 friend void policy::ProcessMongoRequest(InputMessageBase*);
 friend void policy::ProcessThriftRequest(InputMessageBase*);
+friend class OnAppHealthCheckDone;
+friend class HealthCheckManager;
 
 Review comment:
   用PrivateAccessor,不要加friend class


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
jamesge commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r268952699
 
 

 ##
 File path: docs/cn/client.md
 ##
 @@ -242,7 +242,7 @@ locality-aware,优先选择延时低的下游,直到其延时高于其他机
 | - | - |  
| --- |
 | health_check_interval (R) | 3 | seconds between consecutive 
health-checkings | src/brpc/socket_map.cpp |
 
-一旦server被连接上,它会恢复为可用状态。如果在隔离过程中,server从命名服务中删除了,brpc也会停止连接尝试。
+在默认的配置下,一旦server被连接上,它会恢复为可用状态;brpc还提供了应用层健康检查的机制,协议是Http,只有当Server返回200时,这个server才算恢复,可以通过把-health\_check\_path设置成被检查的路径来打开这个功能(如果下游也是brpc,推荐设置成/health,服务健康的话会返回200),-health\_check\_timeout\_ms设置超时(默认500ms)。如果在隔离过程中,server从命名服务中删除了,brpc也会停止连接尝试。
 
 Review comment:
   health_check_timeout_ms需要对Connect也生效么?


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #694: Health check by rpc call

2019-03-26 Thread GitBox
jamesge commented on a change in pull request #694: Health check by rpc call
URL: https://github.com/apache/incubator-brpc/pull/694#discussion_r268951992
 
 

 ##
 File path: docs/cn/client.md
 ##
 @@ -242,7 +242,7 @@ locality-aware,优先选择延时低的下游,直到其延时高于其他机
 | - | - |  
| --- |
 | health_check_interval (R) | 3 | seconds between consecutive 
health-checkings | src/brpc/socket_map.cpp |
 
-一旦server被连接上,它会恢复为可用状态。如果在隔离过程中,server从命名服务中删除了,brpc也会停止连接尝试。
+在默认的配置下,一旦server被连接上,它会恢复为可用状态;brpc还提供了应用层健康检查的机制,协议是Http,只有当Server返回200时,这个server才算恢复,可以通过把-health\_check\_path设置成被检查的路径来打开这个功能(如果下游也是brpc,推荐设置成/health,服务健康的话会返回200),-health\_check\_timeout\_ms设置超时(默认500ms)。如果在隔离过程中,server从命名服务中删除了,brpc也会停止连接尝试。
 
 Review comment:
   说-health_check_path对应的http service要求输入是什么,输出是什么


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:
us...@infra.apache.org


With regards,
Apache Git Services

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