aws-microservices-deploy-options
aws-microservices-deploy-options copied to clipboard
Add X-Ray integration with Fargate and ECS
Show how X-Ray can be enabled and used for distributed monitoring of an application deployed on Fargate and ECS
https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ecs.html
/assign @tiffanyfj
@arun-gupta I have working example of this here, https://github.com/aws-samples/aws-xray-fargate.
Thanks @jicowan, will try it out and then close!
@jicowan could you please explain how to set up health checks? I have now spent over 3 days trying to spin up X-Ray Daemon on Fargate without any avail. Apart from your repo there is pretty much no information available to use as a reference.
@IrmantasM EKS Fargate or ECS Fargate? I didn't configure a healthcheck in my example. Since the X-Ray agent is not exposed as a service, I think you will need to create a Docker healthcheck, https://docs.docker.com/engine/reference/builder/#healthcheck.
@jicowan hey, sorry, I should have mentioned, completely forgot that EKS Fargate is a thing! In my case it's ECS Fargatee.
However, I finally managed to get it to run in "stable" state running as an independent service. I ended up spinning up an nginx container as a sidecar for X-Ray Daemon and used it as a health check endpoint. Next step is to attempt to send data from other services to the daemon service.
@jicowan hey, sorry, I should have mentioned, completely forgot that EKS Fargate is a thing! In my case it's ECS Fargatee.
However, I finally managed to get it to run in "stable" state running as an independent service. I ended up spinning up an nginx container as a sidecar for X-Ray Daemon and used it as a health check endpoint. Next step is to attempt to send data from other services to the daemon service.
Did you manage t do this? having only one shared daemon seems a good option, instead of having one per cluster. If you could provide a small tutorial for this option it would be great.
@albertocorrales unfortunately I did not manage to do it, IIRC reason was because ALB only supports HTTP and HTTPS protocols and NLB doesn’t support UDP for ip target type.
Ended up running x-ray as a sidecar container on each service, so far it's working fine and doesn't seem to be a resource hog. It would be nice to know how much CPU/Memory should be allocated to the sidecar container.