using Express Gateway as load balancer for docker containers

47 Views Asked by At

we have a big issue now. we have implemented api gateway with express gateway and there is an nginx between client and api gateway. there are 3 containers and api gateway rotates the request to a different container upon every request from client. we have simulated a delay in order to understand which container is going to respond, and within that delay, we turn off the container and api gateway returns error and does not rotate the request to a healthy container. do you have any idea how we can fix it? the api gateway is built based on this repository: https://github.com/ExpressGateway/express-gateway

I tried to change the proxy handler mentioned in the repository and I called proxy handler one more time in on('error) of policy function key. but when we turn off the container, it does not return an error again, but it keeps loading and after 1 minutes it give bad gateway error.

0

There are 0 best solutions below