Many requests to KV vs one per request. what's better?

Hi community!

We have our in-house recommendation engine, which we are about to connect with the e-commerce landing page built on top of CF workers.

And now we want to decide which approach to take: one way is to let recommendation engine provide all data required to render the recommendations on the landing page. Another way is to provide only product_ids, and then take everything else from KV. With this method we will need to make a read KV request for each product, provided by recommendation engine.

So, the question: can this “N KV requests per one landing page hit” be considered a good practice? (latency, costs etc.)

What people usually do in such cases?

P.S. our DB is about 8 million products, and there are ~11 recommended items displayed on the landing page.

11 separate kv requests is going to be slower than 1, even if you parallelize them. So if it’s not more complicated to put all required data in one place, and the total amount of data isn’t too large, I’d suggest that.