13 likes
·
1.5K reads
4 comments
How to implement deduplication without using platformatic with Fastify. Is there any demo code to implement it with a route or controller?
I guess implement the package yourself in your Fastify app: github.com/mcollina/async-cache-dedupe
I guess just adding a cache behind each DB call? See some TS example code: github.com/mcollina/async-cache-dedupe?tab…
Here another example implementation: github.com/Shyam-Chen/Fastify-Starter/blob…
If you are more advanced... And understand the examples above.
You could also checkout the Platformatic code, if you want to see a template style of implementing it, thus it can be used in a very general way: github.com/platformatic/platformatic/blob/…
Then the setupCache
method is used here: github.com/platformatic/platformatic/blob/…
You have a typo: "requests per second increase to approximately 25,567 at the 97.5th percentile."
This is for 50th percentile. For 97.5th percentile you actually have 26,191!