Skip to content

Improve support of Geo secondaries behind a load balancer

I'll open another issue for those items. It makes sense to address only the main blocker (secondary authentication) here. These items are incremental improvements on top of that.


A customer wants to run all Geo Nodes behind a location aware load balancer so their users don't need knowledge of Geo. This is not currently possible. Other than https://gitlab.com/gitlab-org/gitlab-ee/issues/6306, they also need the following items addressed. => Support putting the primary behind a Geo node load balancer

Scope has been cut to include only secondaries behind a load balancer. No primary yet.

Perhaps a way to clean up Geo

Don't reuse external_url as a unique identifier for "which GeoNode am I?".

E.g.:

  • Add gitlab_rails['geo_node_name'] to gitlab.rb and default it to external_url.
  • Rename GeoNode#url to GeoNode#name. It will be expected to match gitlab_rails['geo_node_name'].
  • Whereever we use GeoNode#url as an identifier, use GeoNode#name
  • Whereever we use GeoNode#url as a URL that something needs to actually contact, instead use external_url (or internal_url, which is being introduced in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9634).
  • Profit???
UK (primary) USA (secondary 1) China (secondary 2)
gitlab.rb external_url https://gitlab.com https://secondary.gitlab.com https://secondary.gitlab.com
gitlab.rb geo_node_name uk.gitlab.com us.gitlab.com cn.gitlab.com
GeoNode name uk.gitlab.com us.gitlab.com cn.gitlab.com
GeoNode internal_url https://uk.gitlab.com (or let it default to external_url)

 

Edited by Michael Kozono