Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
docs(manifest): add gotchas to template for multiple lb web services #1377
docs(manifest): add gotchas to template for multiple lb web services #1377
Changes from 1 commit
f49ee1b
c3f863a
70a5b93
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double checked on this one -- for one service, it threw errors that the prefixed path wasn't found.
Think this one has a weird interplay with the Load Balancer. For example, with Hasura:
https://github.com/hasura/graphql-engine
It seems that if you put this at a subpath,
path: "hasura"
, you cannot load any endpoint after it being deployed with Copilot because the internal application router is broken.Because the root path already had
/hasura
in it, when I tried to visit the route/console
at/hasura/console
, it throw nonexistent path error from the Hasura service, and then in the Fargate logs I could see it wasn't stripping the/hasura
prefix from the route:See
http_info.url
here:In Hasura's case, the Healthcheck endpoint lives at
/healthz
, but giving/hasura/healthz
as a path to Copilot results in failure, and giving/healthz
cannot work because it'll never hit the/hasura
path and be routed 😬This kind of effectively renders the web service useless since none of the paths will route properly.
(Unrelated: Would attaching a domain fix this?)
Might be better for someone from your team who understands this more to weigh in here, I think I may have been mistaken on this one, sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heya!
I double-checked this and the healthcheck path should still be the path in the service code (just
/healthz
and not/hasura/healthz
). I believe this is because it's a property of the Target Group so you don't need to prefix it with the rule path ("hasura").Out of curiosity: Does running the container locally work? My suspicion is that the container fails to come up so it never gets to the point where it can query the "/healthz" path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm 🤔
The
hasura
instance does run locally, and it was running on the ELB there (that error format withpath: $, error: xxx
is Hasura's web server response) but because of the LB having it at/hasura
, when Hasura router handled the requests it was trying to send them to wrong place.For example:
So basically because the app webserver router is parsing
/hasura/console
and not stripping/hasura
, it won't route properly.This makes sense -- so it is not possible to check the
healthcheck
path from outside of the running container then right?If you want to test this really quick, you can make a Dockerfile like below:
FROM hasura/graphql-engine:v1.3.1
And this manifest + try deploying it (it needs
HASURA_GRAPHQL_DATABASE_URL
env connected to Postgres):