Reidmcc / rockfish

Rockfish is an arbitrage bot for the Stellar Decentralized Exchange (SDEX)
MIT License
71 stars 23 forks source link

Add option for rate limiting the multi-streamed API calls #24

Closed Reidmcc closed 5 years ago

Reidmcc commented 5 years ago

Is your feature request related to a problem? Rockfish doesn't trigger Horizon rate limiting on its own with a reasonable number of assets, but if you're also running something else that queries Horizon, like Kelp, the combined queries can trigger Horizon rate limiting and mess things up. Using a ton of assets might make Rockfish get rate-limited on its own.

Describe the solution you'd like Add a config option like THREAD_SPACER_MILLISECONDS to let the user add a bit of time between the multi-threaded API calls so they don't all hit Horizon at the same time.

Describe alternatives you've considered I thought about developing middleware to manage combined cross-app outgoing queries but that's a much bigger lift and probably over-thinking it.

Reidmcc commented 5 years ago

closed by https://github.com/Reidmcc/rockfish/pull/29