Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
409 views
in Technique[技术] by (71.8m points)

kubernetes - Sporadic 502 on single instance, not every

I have a setup where Traefik is running behind corporate PLB in Kubernetes, but then it handles all traffic from there.

For a services that is failing, we run 3 instances of it; ms-1, ms-2, ms-3 through Kubernetes deployment. Traffic is directed to each in round robin.

Sometimes, we observe random 502 on one of the nodes and requests are not forwarded to any node. After a while, it auto corrects and connection is restored for the failing one.

ForwardURL="http://x.x.x.x:8100/"

level=debug msg="'502 Bad Gateway' caused by: dial tcp x.x.x.x:8100: connect: connection refused"

Question:

  1. Does Traefik retry sending/forward to other replica nodes, if any 1 is failing? Doesn't seem to happen here as the http request returns 502.
  2. Why would this issue come and what can be fixed? I read other topics and mostly find suggestions to use the correct port, ip, service name, etc. That doesn't seem the case here as 1 of the 3 node fails, that too sometimes.
question from:https://stackoverflow.com/questions/65928964/sporadic-502-on-single-instance-not-every

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...