Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Cannot configure backend Capacity #234

Open
skolenkin opened this issue Apr 13, 2020 · 0 comments
Open

Cannot configure backend Capacity #234

skolenkin opened this issue Apr 13, 2020 · 0 comments

Comments

@skolenkin
Copy link

skolenkin commented Apr 13, 2020

The capacity parameter on each Backend always is 100%

According to GitHub code:
https://github.com/GoogleCloudPlatform/k8s-multicluster-ingress/blob/master/app/kubemci/pkg/gcp/backendservice/backendservicesyncer.go#L300-L309
Backend service with RATE balancing mode has max rate

func desiredBackends(igLinks []string) []*compute.Backend {
	// Sort the slice so we get determistic results.
	sort.Strings(igLinks)
	var backends []*compute.Backend
	for _, ig := range igLinks {
		backends = append(backends, &compute.Backend{
			Group: ig,
			// We create the backend service with RATE balancing mode and set max rate
			// per instance to max value so that all requests in a region are sent to
			// instances in that region.
			// Setting rps to 1, for example, would round robin requests amongst all
			// instances.
			BalancingMode:      "RATE",
			MaxRatePerInstance: 1e14,
			// We have to fill in these fields so we can properly compare to what's returned to us
			CapacityScaler: 1,
		})
	}
	return backends
}

Even if you decide to change capacity manually on the LoadBalancer backend configuration MCI backendservicesyncer will replace changes to the default value (100% for each backend).

Based on:
https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-for-anthos

Overview
Ingress for Anthos (Ingress) is a cloud-hosted multi-cluster Ingress controller for Anthos GKE clusters. It's a Google-hosted service that supports deploying shared load balancing resources across clusters and across regions. 

this (load balancing across clusters) will never happen.

We have checked it by deploying 2 GKE cluster in different EU regions. Connect to LoadBalancer VIP from EU leads to always response from application in the first GKE Cluster in EU.
From US we have approximately 60%-80% connections to application in the first GKE Cluster in EU.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant