Hey everyone! š
So, Iāve been messing around with axios retry for a bit now, and Iām curiousāwhatās your go-to approach for handling failed requests? Like, do you guys set a max number of retries or just let it go wild? š
Also, how do you handle delays between retries? Exponential backoff? Or just a fixed delay? Iāve seen some folks use libraries for axios retry, but Iām wondering if itās worth it or if I should just roll my own solution.
Lastly, whatās your strategy for logging failed attempts? Do you log every single retry or just the final failure?
Kinda new to this, so any tips or best practices would be super helpful! Thanks in advance! š
Hey! I usually set a max number of retries for axios retryālike 3 or 5. Letting it go wild can sometimes just hammer the server unnecessarily, ya know?
For delays, I prefer exponential backoff. Itās a lifesaver when the serverās struggling. Iāve used the `axios-retry` library, and itās super easy to set up. No need to reinvent the wheel!
Logging-wise, I log the final failure and maybe the first retry if itās a critical system. Too many logs can clutter things.
Check out the `axios-retry` package on npmāitās a game-changer!
Iām all about rolling my own solution for axios retry. Itās not too hard to implement, and you get full control.
I use a fixed delay of 2 seconds between retries. Simple and effective.
For logging, I log every retry but only store the final failure in the database. Helps with debugging without overloading storage.
If youāre new, maybe start with a library like `axios-retry` and then tweak it as you go.
Exponential backoff is the way to go for axios retry, imo. Itās built for handling server load gracefully.
I set a max of 4 retries. Anything more feels excessive.
For logging, I use a middleware to capture all retries but only alert on the final failure. Keeps things clean.
If youāre curious, the `retry-axios` library is another solid option.
Iāve been using axios retry with a max of 3 retries and a fixed delay of 1 second. Works fine for most cases.
I log every retry attempt but only send notifications for the final failure. Helps me track patterns over time.
If youāre new, Iād recommend starting with a library like `axios-retry`. Itās well-documented and saves time.
Honestly, I let axios retry go wild sometimes, but only for non-critical requests. For important stuff, I cap it at 5 retries with exponential backoff.
Logging every retry can be useful for debugging, but it depends on your systemās needs.
Iāve used both custom solutions and libraries like `axios-retry`. Libraries are great for quick setups, but custom code gives you more flexibility.
Iām a fan of using axios retry with a max of 3 retries and a 1-second delay. Keeps things simple.
For logging, I only log the final failure. Too many logs can make it hard to find the real issue.
If youāre new, Iād suggest trying out the `axios-retry` library first. Itās super easy to configure and saves a lot of time.
I use axios retry with exponential backoff and a max of 4 retries. Itās a good balance between persistence and not overloading the server.
For logging, I log every retry but only store the final failure in the database. Helps with debugging without cluttering the logs.
If youāre looking for a library, `axios-retry` is a solid choice. Itās lightweight and easy to use.
Iāve been using axios retry with a max of 5 retries and a fixed delay of 2 seconds. Works well for my use case.
I log every retry attempt but only send alerts for the final failure. Helps me keep track of issues without getting overwhelmed.
If youāre new, Iād recommend starting with a library like `axios-retry`. Itās well-documented and easy to set up.
Wow, thanks everyone for the awesome tips! š I think Iāll start with the `axios-retry` library since so many of you recommended it.
Quick question thoughāfor those of you using exponential backoff, do you tweak the base delay or just stick with the default? Also, any tips for testing retries locally?
Thanks again, yāall are the best! š