Issue about load balance of gRPC#4251
Conversation
Fixed issue about loading balance of gRPC on kubenetes via this line of code. If the clients of AGENT deploy on kubernetes and call the OAP service by default cluster IP mode without any technology of service mesh like istio etc. it will occur the issue about traffic load. So for we have resolved this issue via the headless service difination without the clust IP setting and registered multiple A records of DNS for the OAP service on that. Anyway it needs to enhance the code of this class for the defualt behavior of load balance and almost has not any impact if it is out of kubernetes environment. Seems to work smoothly.
| @Override public ManagedChannelBuilder build(ManagedChannelBuilder managedChannelBuilder) throws Exception { | ||
| return managedChannelBuilder.nameResolverFactory(new DnsNameResolverProvider()) | ||
| /** | ||
| * It seems the code above can only work for low gRPC version. |
There was a problem hiding this comment.
We don't need to describe the history.
| /** | ||
| * It seems the code above can only work for low gRPC version. | ||
| */ | ||
| .loadBalancerFactory(RoundRobinLoadBalancerFactory.getInstance()) |
There was a problem hiding this comment.
According to the header of RoundRobinLoadBalancerFactory, this is experimental. And also, this could use more connections of OAP backend, you should create a Config, at Config#Collector#OPEN_ROUND_ROBIN_LOAD_BALANCE default false, to support this feature.
/**
* A {@link LoadBalancer} that provides round-robin load balancing mechanism over the
* addresses from the {@link NameResolver}. The sub-lists received from the name resolver
* are considered to be an {@link EquivalentAddressGroup} and each of these sub-lists is
* what is then balanced across.
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771")
public class RoundRobinLoadBalancerFactory extends LoadBalancer.Factory {
There was a problem hiding this comment.
Also, this doc should be updated as new config added. https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/README.md#table-of-agent-configuration-properties
There was a problem hiding this comment.
OK. Will add these details ASAP
|
@wu-sheng I guess there're something wrong with the GitHub settings, the required checks are failed and no approvals from committers, the merge button still shows, do you know why it's the case? |
|
@kezhenxu84 I feel strange too, just created this, https://issues.apache.org/jira/browse/INFRA-19734 |
|
@kezhenxu94 Strange, #4220 shows checks are existing. |
wu-sheng
left a comment
There was a problem hiding this comment.
Request improvements as comments above.
Codecov Report
@@ Coverage Diff @@
## 6.x #4251 +/- ##
=========================================
- Coverage 27.3% 27.24% -0.06%
=========================================
Files 1140 1140
Lines 25027 25028 +1
Branches 3619 3619
=========================================
- Hits 6833 6819 -14
- Misses 17588 17608 +20
+ Partials 606 601 -5
Continue to review full report at Codecov.
|
|
This PR is targeting the wrong branch, so this happens. @bennyparlo You should send a pull request to the master branch, as this is a feature change. 6.x is in maintenance mode only. |

Fixed issue about loading balance of gRPC on kubenetes via this line of code. If the clients of AGENT deploy on kubernetes and call the OAP service by default cluster IP mode without any technology of service mesh like istio etc. it will occur the issue about traffic load. So for we have resolved this issue via the headless service difination without the clust IP setting and registered multiple A records of DNS for the OAP service on that. Anyway it needs to enhance the code of this class for the defualt behavior of load balance and almost has not any impact if it is out of kubernetes environment. Seems to work smoothly.
Please answer these questions before submitting pull request
Why submit this pull request?
Bug fix
New feature provided
Improve performance
Related issues
Bug fix
Bug description.
How to fix?
New feature or improvement