Open iokiwi opened 1 year ago
I am considering a redis cluster for this just for the sake of learning redis :)
cosmos db :D ?
For the in memory cache could use memcached as well it's a lot simpler than Redis and it's Open BSD license https://memcached.org/
Do we want the exchange rates to be very accurate or are we ok to save the exchange rates eg. like 12am every night or something?
Calling out to an external API to get exchange rates on every request is suboptimal for several reasons.
Either we will have to pay for API usage or we are placing unfairly placing unnecessary load on a service run for free.
We should keep a table in our database with a recent exchange rate and the time it was updated.
We can update the table on a schedule or inflight if the data has become 'stale' according.