if you do blocking DB operations before serving ads, latency won't be great. Assuming you don't have to wait for transactions to commit, you can probably push required operations onto a queue (Redis would be fine for that) and serve the content immediately?
Comments
if you do blocking DB operations before serving ads, latency won't be great. Assuming you don't have to wait for transactions to commit, you can probably push required operations onto a queue (Redis would be fine for that) and serve the content immediately?