Currency endpoint improvements
tiffany352 opened this issue · comments
- Don't delay responses, return a stale value and update asynchronously. The upstream endpoints are very slow and there's no point in delaying requests, as the upstream endpoints update infrequently.
- Fix concurrency bug where if there's already a request in flight, it will cause multiple requests to be sent out.
- Set up proxy caching for the endpoint in the nginx config (this is a server specific task).
I want to be reasonably confident that the endpoint won't fall over once it starts seeing frequent use.
Fixed in 20cc99c: Now uses a cron job to update a file on the webserver, which I can set to update every hour or so. The file can be directly served by nginx without touching the rink-web server.