NCATS-Tangerine / tranql

A Translator Query Language
https://researchsoftwareinstitute.github.io/data-translator/apps/tranql
MIT License
8 stars 6 forks source link

Tranql varnish cache #94

Closed YaphetKG closed 4 years ago

YaphetKG commented 4 years ago
YaphetKG commented 4 years ago

Summary of PR:

  1. Created a none root user container for varnish by building from sources, this was because there is a library that needs to be built in order to do things like request body hashing which is not in the default docker build for varnish.

  2. Created a base vcl config that once imported in other configs it would enable caching post requests. This way we can have an include of that script and we just need to define our backend servers that the cache is serving from. Some details about 2: current configuration is able to hash a body of upto 500KB. These are things like queries and question messages. This is not the response coming back from backend rather the value used to compute the key that varnish would later use for lookups. I think that is a large enough number to capture any tranql query/ reasoner question (maybe too large?). This is like a cap for when not to cache.

  3. Made some helm configurations for tranql, and this also supports toggling the cache on and off via a helm value. There are two caches used one in front of tranql-frontend and other is in front of the back-plane and this toggle will disable/enable both.