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

[BUG?] Mesh configuration in ECS walkthrough #253

Closed
hffmnn opened this issue Jan 28, 2020 · 2 comments
Closed

[BUG?] Mesh configuration in ECS walkthrough #253

hffmnn opened this issue Jan 28, 2020 · 2 comments
Labels
question Further information is requested

Comments

@hffmnn
Copy link

hffmnn commented Jan 28, 2020

Describe the bug
Trying to understand the mesh setup in the ECS walkthrough, I stumbled upon this line of code:
https://github.com/aws/aws-app-mesh-examples/blob/master/examples/apps/colorapp/servicemesh/appmesh-colorapp.yaml#L99

The DNS:Hostname configuration of the ColorTellerWhiteVirtualNode is the same as the name of the virtual service (colorteller.${ServicesDomain}). Looking at the other color nodes, the all have their color in the DNS name, e.g. colorteller-red.${ServicesDomain}.

Also the mesh overview image shows the name of the virtual node as colorteller-white.

Platform
ECS

To Reproduce
Steps to reproduce the behavior: See the linked code above.

Expected behavior
I expected the mesh setup not to work and wonder why it works at all? Shouldn't the DNS entry be unique? Note: Looks like the setup still works.

@hffmnn hffmnn added the bug Something isn't working label Jan 28, 2020
@bcelenza bcelenza added the question Further information is requested label Jan 28, 2020
@bcelenza
Copy link
Contributor

bcelenza commented Jan 28, 2020

@hffmnn One of the current limitations of Virtual Services is that their names must resolve via DNS to an IP address from the perspective of the application, otherwise it will fail to make a request. However, for the case of HTTP traffic, that IP address can be almost anything, as once the request is intercepted by the Envoy, the HTTP authority (host) header is inspected and the actual destination determined and routed to.

So for the color app example, we set the white virtual node's host name to the same as the virtual service just so there would be a DNS A record for colorteller.${ServicesDomain}. You could in theory set any of the virtual nodes to that hostname, so long as all the virtual nodes behind the color teller virtual service have unique discovery names. Or you could add an arbitrary A record for colorteller.${ServicesDomain} in your DNS registry to achieve the same effect.

See aws/aws-app-mesh-roadmap#65 for a little more information on this current limitation. We're hoping to resolve this issue by having Envoy respond to the DNS queries made by the application behind it.

@bcelenza bcelenza removed the bug Something isn't working label Jan 28, 2020
@hffmnn
Copy link
Author

hffmnn commented Jan 28, 2020

Thanks @bcelenza for this great explanation. 🙇

@hffmnn hffmnn closed this as completed Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants