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

Add a "lbGroup" prefix to load balancing group membership tag. #522

Merged
merged 1 commit into from
Nov 8, 2019

Conversation

mikkokar
Copy link
Contributor

@mikkokar mikkokar commented Nov 8, 2019

Add lbGroup prefix to load balancing group membership tags. This makes them self-identifying. As a result the tag can be recognised without having to know the load balancing group configuration.

Also add a ObjectTags.kt to serve as a formal specification for tag names.

Add ObjectTags.kt to serve as a formal specification for tag names.
@mikkokar mikkokar requested review from OwenLindsell and chrisgresty and removed request for OwenLindsell November 8, 2019 13:07
- state:inactive
config:
host: localhost:${appA01.port()}

app-A-02:
type: HostProxy
tags:
- App-A
- lbGroup=App-A
- state:inactive:3
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this use : instead of = to be consistent with the state:inactive tag?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or are we going to standardize on =?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi. I thought about this and chose ’=‘ because ‘:’ already appears in creation time tag values.

Therefore would be best to standardise on ‘=‘. My gut feeling is that it will be less likely to occur in the value parts.

*/
package com.hotels.styx

fun lbGroupTag(name: String) = "lbGroup=$name"
Copy link
Contributor

@chrisgresty chrisgresty Nov 8, 2019

Choose a reason for hiding this comment

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

I guess you don't need it now (YAGNI, etc.) but do you also see adding functions here to extract the RHS from a tag ? e.g. fun lbGroupTag(tags: Set<String>) : String?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi. Yes. Right now it is unnecessary. But will add if or when necessary.

- state:inactive
config:
host: localhost:${appA01.port()}

app-A-02:
type: HostProxy
tags:
- App-A
- lbGroup=App-A
- state:inactive:3
Copy link
Contributor

Choose a reason for hiding this comment

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

Or are we going to standardize on =?

@mikkokar mikkokar merged commit f57e2bd into ExpediaGroup:master Nov 8, 2019
@mikkokar mikkokar deleted the rename-lb-group-tag branch November 8, 2019 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants