-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fastify etag bringing QPS down for paths where dummy etags have been added #106
Comments
Thanks for reporting! Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that. |
So let's say there are 2 paths like this, both give me the same QPS. |
You are bypassing Fastify headers logic by using the raw object. |
so shouldn't the QPS of the /dummyetag path be lesser since etag generation is not happening |
What do you get as etag value if you do a console.log(etag) after Line 36 in ddefbef
? |
I get the 'etag' here @Uzlopak |
Prerequisites
Fastify version
4.15.0
Plugin version
4.2.0
Node.js version
16.5.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.6.5
Description
I used the fastify etag plugin and for the url paths where I did not require etag I added a dummy etag but the QPS for both the paths decreased significantly after adding the plugin
I also tried generating etag myself and this seemed to be give me better QPS. Any reasons for this strange behaviour or is this expected?
Steps to Reproduce
Add
reply.raw.setHeader(etag, 'dummyetag');
to one path's reply and check if there is a drop in QPSExpected Behavior
The QPS should not decrease for paths that already have etag headers
The text was updated successfully, but these errors were encountered: