Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Suggestion: support multiple targets via annotations #53

Open
ideahitme opened this issue Jan 8, 2017 · 2 comments
Open

Suggestion: support multiple targets via annotations #53

ideahitme opened this issue Jan 8, 2017 · 2 comments

Comments

@ideahitme
Copy link
Contributor

ideahitme commented Jan 8, 2017

Description: multiple services may wish to share same DNS, while having different targets (Load Balancers). Hence, in certain cases we need to configure records in the cloud provider to support multiple targets.

Current State:
Multiple targets are supported in GKE, but not in AWS. In AWS environment two endpoints with same DNS will result in an error returned from AWS API (two non-weighted alias records sharing same DNS value).

Possible Solutions:
Create a Route53 weighted records instead of simple records. Hence, Mate will add/remove targets from the record as services are changed/removed. However if this is done implicitly the potential problem is that this may result in unexpected behaviour from user's point of view. In my opinion, this should be done explicitly only when certain annotation exist on the service, indicating that the service should get weighted RRS on Route53 (other services should be labeled with same annotation):

...
  annotations:
    zalando.org/dnsname: annotated-nginx.foo.com
    zalando.org/type: weighted
...

If annotation is missing, simple record will be created. The rule of not overwriting existing record still applies.

@linki @Raffo @mikkeloscar @hjacobs

@hjacobs
Copy link
Contributor

hjacobs commented Jan 9, 2017

Maybe use some zalando.org/dnsweight annotation with an integer value (weight) instead? If the annotation does not exist, throw an error if more than one service specifies the same zalando.org/dnsname. Otherwise just use the annotation value as Route53 weight. This allows weighted DNS load balancing such as what Senza does.

@ideahitme
Copy link
Contributor Author

ideahitme commented Jan 10, 2017

So it means:

  1. We got multiple services with same DNS and all with zalando.org/dnsweight value - create as expected
  2. We got multiple services with same DNS name and only some with zalando.org/dnsweight value -
    a. If there exist a record of some type in Route53 - just create record(s) of correct type and discard others
    b. If none exist at this moment - give priority to weighted records and record(s) without zalando.org/dnsweight annotation is discarded.

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

No branches or pull requests

2 participants