Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce XdsCentralDogmaBuilder #984

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Conversation

jrhee17
Copy link
Contributor

@jrhee17 jrhee17 commented Jul 18, 2024

Motivation

CentralDogma is used deployed in multiple regions/zones. Given that we will soon be supporting zone-aware load balancing from Armeria's side, we can use CentralDogma to take advantage of zone-aware load balancing.

For instance:

  • we may route only reads to the CentralDogma in the same zone, whereas write requests will be done to a single pre-designated zone.
  • in DR situations, we can quickly route traffic between zones dynamically

Modifications

  • Introduced XdsCentralDogmaBuilder, which builds an ArmeriaCentralDogma based on parameters
    • Most methods in AbstractArmeriaCentralDogmaBuilder didn't make sense for xDS, so AbstractCentralDogmaBuilder is extended directly
  • Moved ArmeriaCentralDogma from the client package to the internal package so that XdsCentralDogmaBuilder can also build an ArmeriaCentralDogma.
  • The CentralDogma created by XdsCentralDogmaBuilder creates an XdsBootstrap internally that should be closed. For this reason, CentralDogma now inherits AutoCloseable which closes underlying resources such as XdsBootstrap or EndpointGroup.
  • Misc) Modified CentralDogmaRuleDelegate since configuring a CentralDogmaExtension with server#port threw an exception since the ipv6 scope id wasn't understood.

Result

  • java-armeria-xds client is introduced

@jrhee17 jrhee17 added this to the 0.68.0 milestone Jul 18, 2024
@jrhee17 jrhee17 marked this pull request as ready for review July 18, 2024 05:29
@minwoox minwoox modified the milestones: 0.68.0, 0.69.0 Jul 23, 2024
Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍👍

Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome. 👍 👍 👍

@ikhoon ikhoon merged commit 96b9fc8 into line:main Aug 16, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants