Any way to force a delay on requests? #3778
-
This might be a very niche use case for verdaccio, but I would like to use it for benchmarking npm install tests in a consistent fashion. I'm testing the benefits of optimizations to dependency install workflows and I would like to avoid inconsistent network timings in my benchmarks. But I don't want to completely ignore network latency. I would like to run my verdaccio server with some sort of forced latency so that I can consistently measure what the impact of different optimizations would be for an "average" install. Sorry if this is already easy and I'm just missing it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I've read nginx has tools for that, have you researched anything in that direction? |
Beta Was this translation helpful? Give feedback.
-
While I would also initially suggest to use a "throttling" reverse proxy in front of your verdaccio instance, you could also try limiting a Docker container's bandwidth (assuming you are running verdaccio inside a container): |
Beta Was this translation helpful? Give feedback.
While I would also initially suggest to use a "throttling" reverse proxy in front of your verdaccio instance, you could also try limiting a Docker container's bandwidth (assuming you are running verdaccio inside a container):
https://stackoverflow.com/questions/25497523/how-can-i-rate-limit-network-traffic-on-a-docker-container