-
Hi All :) We have about 10 moleculer projects bringing together about 20 services all talking through nats-operator in K8s. In production we also have multiple replicas for each project. So it is a lot of moleculer nodes. The K8s deployments have RollingUpdates with maxSurge and maxUnavailable and readiness delays to make the deployments as uptimey as possible and moleculer has tracking enabled for graceful shutdowns. However, despite this some requests are still being rejected during k8s deployments. I think it is because the "old" terminated node is still being sent requests when it shouldn't be. In our dev environment I am about to start digging into the metrics & logs on the NATS cluster to understand what is happening. In the meantime though, has anyone found this and if so what workarounds have you tried? I am assuming some config tweak is needed in either moleculer or NATS (or both) to improve it. Is it a good idea to trap rejected requests on the gateway and just retry them? Many thanks for any info. To the moleculerjs team: "Awesome work!" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
@theZappr Maybe you could collect more information about this situation by using trace mode, what exactly is happening at this moment from the side of the transport logLevel: {
"TRANS*": "trace",
"**": "info"
} |
Beta Was this translation helpful? Give feedback.
-
Yeah I found it. It' s a Dockerfile issue. It shouldn't be using npm start to run the app. Not a moleculer issue at all. Thank you for your input @intech :) |
Beta Was this translation helpful? Give feedback.
Yeah I found it. It' s a Dockerfile issue. It shouldn't be using npm start to run the app.
Not a moleculer issue at all.
Thank you for your input @intech :)