dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [dubbo-go] AlexStocks commented on a change in pull request #584: Ftr: add comment for cluster
Date Wed, 03 Jun 2020 16:01:14 GMT

AlexStocks commented on a change in pull request #584:
URL: https://github.com/apache/dubbo-go/pull/584#discussion_r434673549



##########
File path: cluster/loadbalance/least_active.go
##########
@@ -39,7 +38,9 @@ func init() {
 type leastActiveLoadBalance struct {
 }
 
-// NewLeastActiveLoadBalance ...
+// NewLeastActiveLoadBalance returns least active load balance
+//
+// A random mechanism based on actives, actives means the num of requests a consumer have
sent but not return yet

Review comment:
       // NewLeastActiveLoadBalance returns a least active load balance instance.
   //
   // A random mechanism based on actives, actives means the number of a consumer's requests
have been sent to provider but not yet got response.

##########
File path: cluster/cluster_impl/mock_cluster.go
##########
@@ -24,7 +24,11 @@ import (
 
 type mockCluster struct{}
 
-// NewMockCluster ...
+// NewMockCluster returns mock cluster instance
+//
+// Mock cluster is usually used for service degradation, such as an authentication service.
+// When the service provider is completely hung up, the client does not throw an exception,
+// but returns the authorization failure through the Mock data.

Review comment:
       // NewMockCluster returns a mock cluster instance.
   //
   // Mock cluster is usually used for service degradation, such as an authentication service.
   // When the service provider is completely hung up, the client does not throw an exception,
   // return an authorization failure through the Mock data instead.

##########
File path: cluster/cluster_impl/broadcast_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(broadcast, NewBroadcastCluster)
 }
 
-// NewBroadcastCluster ...
+// NewBroadcastCluster returns broadcast cluster instance
+//
+// Calling all providers broadcast, one by one call, any error is reported.

Review comment:
       // NewBroadcastCluster returns a broadcast cluster instance.
   //
   // Calling all providers' broadcast one by one. All errors will be reported.

##########
File path: cluster/cluster_impl/failfast_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(failfast, NewFailFastCluster)
 }
 
-// NewFailFastCluster ...
+// NewFailFastCluster returns failfast cluster instance
+//
+// Fast failure, only made a call, failure immediately error. Usually used for non-idempotent
write operations,
+// such as adding records.

Review comment:
       // NewFailFastCluster returns a failfast cluster instance.
   //
   // Fast failure, only made a call, failure immediately error. Usually used for non-idempotent
write operations,
   // such as adding records.

##########
File path: cluster/cluster_impl/registry_aware_cluster.go
##########
@@ -29,7 +29,7 @@ func init() {
 	extension.SetCluster("registryAware", NewRegistryAwareCluster)
 }
 
-// NewRegistryAwareCluster ...
+// NewRegistryAwareCluster returns registry aware cluster instance

Review comment:
       // NewRegistryAwareCluster returns a registry aware cluster instance.

##########
File path: cluster/cluster_impl/failsafe_cluster.go
##########
@@ -31,7 +31,9 @@ func init() {
 	extension.SetCluster(failsafe, NewFailsafeCluster)
 }
 
-// NewFailsafeCluster ...
+// NewFailsafeCluster returns failsafe cluster instance
+//
+// Failure of security, anomalies, directly ignored. Usually used to write audit logs and
other operations.

Review comment:
       // NewFailsafeCluster returns an failsafe cluster instance.
   //
   // Failure of security, anomalies, directly ignored. Usually it is 
   //  used to write audit logs and other operations.

##########
File path: cluster/cluster_impl/available_cluster_invoker.go
##########
@@ -35,7 +35,7 @@ type availableClusterInvoker struct {
 	baseClusterInvoker
 }
 
-// NewAvailableClusterInvoker ...
+// NewAvailableClusterInvoker returns cluster invoker instance

Review comment:
       NewAvailableClusterInvoker returns a cluster invoker instance

##########
File path: cluster/loadbalance/random.go
##########
@@ -38,7 +38,9 @@ func init() {
 type randomLoadBalance struct {
 }
 
-// NewRandomLoadBalance ...
+// NewRandomLoadBalance returns random load balance instance
+//
+// Set random probabilities by weight, the request sent to provider is random

Review comment:
       // NewRandomLoadBalance returns a random load balance instance.
   //
   // Set random probabilities by weight, and the request will be sent to provider randomly.

##########
File path: cluster/cluster_impl/failback_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(failback, NewFailbackCluster)
 }
 
-// NewFailbackCluster ...
+// NewFailbackCluster returns failback cluster instance

Review comment:
       NewFailbackCluster returns a failback cluster instance.

##########
File path: cluster/loadbalance/round_robin.go
##########
@@ -52,7 +52,9 @@ func init() {
 
 type roundRobinLoadBalance struct{}
 
-// NewRoundRobinLoadBalance ...
+// NewRoundRobinLoadBalance returns round robin load balance

Review comment:
       NewFailFastCluster returns a failfast cluster instance

##########
File path: cluster/loadbalance/least_active.go
##########
@@ -28,7 +28,6 @@ import (
 )
 
 const (
-	// LeastActive ...
 	LeastActive = "leastactive"

Review comment:
       yes.

##########
File path: cluster/cluster_impl/forking_cluster.go
##########
@@ -31,7 +31,10 @@ func init() {
 	extension.SetCluster(forking, NewForkingCluster)
 }
 
-// NewForkingCluster ...
+// NewForkingCluster returns forking cluster instance
+//
+// Multiple servers are invoked in parallel, returning as soon as one succeeds.
+// Usually used for real-time demanding read operations, but need to waste more service resources.

Review comment:
       // NewForkingCluster returns a forking cluster instance.
   //
   // Multiple servers will be invoked in parallel at the same time, and return asap when

   // getting response from  the fastest server. 
   // Usually it is used for real-time demanding read operations while wasting more service
resources.

##########
File path: cluster/cluster_impl/failover_cluster.go
##########
@@ -31,7 +31,11 @@ func init() {
 	extension.SetCluster(name, NewFailoverCluster)
 }
 
-// NewFailoverCluster ...
+// NewFailoverCluster returns failover cluster instance
+//
+// Failure automatically switch, when there is failure,
+// retry the other server (default). Usually used for read operations,
+// but retries can result in longer delays.

Review comment:
       // NewFailoverCluster returns a failover cluster instance.
   //
   // Failure automatically switch, when there is a failure,
   // retry the other server (default). Usually used for read operations,
   // but retries can result in longer delays.




----------------------------------------------------------------
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: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Mime
View raw message