indexer icon indicating copy to clipboard operation
indexer copied to clipboard

Leverage Hasura for Caching.

Open dandlezzz opened this issue 2 years ago • 6 comments

I lean towards caching graphql response in redis. Would love hear other thoughts.

dandlezzz avatar Jul 22 '22 19:07 dandlezzz

redis would be a good solution

any thoughts about:

  • key structure? (im thinking query md5sum or something)
  • data TTL?

echohtp avatar Jul 22 '22 21:07 echohtp

Use hasura as a cache layer that proxies our api adds caching directives to queries

https://hasura.io/graphql/caching/

kespinola avatar Jul 24 '22 07:07 kespinola

https://docs.stellate.co

Another graphql caching service

kespinola avatar Jul 24 '22 12:07 kespinola

@kespinola stellate looks cool. Do you know if its open source? I couldn't really tell. Also, Hasura looks promising, I know in prod we saw that Hasura adds latency to each request. @mpwsh any idea what it would take to resolve those?

dandlezzz avatar Jul 25 '22 19:07 dandlezzz

We could spin up Hasura in our kubes cluster for the stage env and start testing there. Hasura Cloud with VPC Peering is pretty expensive

mpwsh avatar Jul 25 '22 19:07 mpwsh

@dandlezzz dammit it seems Hasura built in caching is only available for cloud. Back to square one? Redis? will continue researching different options

mpwsh avatar Jul 26 '22 18:07 mpwsh

Exploring alternative options. Hasura max cache size is 100MB and $10k per month.

kespinola avatar Oct 05 '22 14:10 kespinola