Unexplained 504 while making requests from Angular app to Service inside K8s Cluster

10/15/2018

I have an Angular 6 app deployed in S3 deployed using Cloudfront .

My Backend looks like this

API GATEWAY ====> LoadBalancer ====> K8s Cluster ====> Service

For certain instances, my requests return a 504. They do not get logged in the service at that time. I am confused as to why that happens. The requests do get logged at Api Gateway. After repeated attempts, the request gets successfully executed and logged at the service level. I cannot explain as to why this happens when I make these requests from the app. The same requests made from POSTMAN seem to work in one go. I am using the HttpClient to make my requests. The problem is with it randomly working. Can anyone shed some light?

-- Jeson Dias
amazon-web-services
angular
aws-api-gateway
httpclient
kubernetes

0 Answers