How to implement ETags?

Hi there!

I have a setup like following:

Clients (browser, mobile apps, etc) => API proxy => Elasticsearch

I'd like to implement ETags, so that i can save bandwidth to the clients.

In the past (e.g when hiting a RDMS), i've done this on the API proxy by doing a simple hash of the response, and using that as the value.

But was wondering if there's something in the Elasticsearch response (i'm mostly using the Search API) that i can use for the ETag, to both save on the CPU cycles to create my own, and also to potentially issue conditional requests to ES from my API proxy? (although i'm mainly wanting it for the clients)

Thanks!

Can you elaborate a little more on what you mean by this>

I'm hoping ES has a value I can use for the etag that I send onto clients in the API responses.

Otherwise I would have to hash the ES response and do it myself

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.