🤗 [Question]: upstream reply with long time
wade-liwei opened this issue · comments
Question Description
I use go fiber as the API server; Api server calling another API server takes 3 minutes,
I do benchmark 2 TPS, but after 5 minutes, the Go Fiber API can not be accessed.
Do you have parameters for this environment?
Code Snippet (optional)
No response
Checklist:
- I agree to follow Fiber's Code of Conduct.
- I have checked for existing issues that describe my questions prior to opening this one.
- I understand that improperly formatted questions may be closed without explanation.
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
I found out the following parameters, but I am not sure these parameters resolve the problem.
DefaultBodyLimit = 4 * 1024 * 1024
DefaultConcurrency = 256 * 1024
DefaultReadBufferSize = 4096
DefaultWriteBufferSize = 4096
DefaultCompressedFileSuffix = ".fiber.gz"
@wade-liwei Can you provide an example code where this happens?
I can not provide an example code.
there are many dependent.
@wade-liwei If you are getting 429's it means you are being rate-limited by the service upstream which i guess is Loki in this case.
You need to add logic to your code, if yoy get 429, backoff and sleep then try again.
Thank you, I will try your suggestion.
@wade-liwei Awesome! 💪