4 ms·
Are you aware of a tool that supports or planning to add support for more advanced delays? E.g. let through the http response headers and then slowly drizzly th
by spockz 4y ago
Are you aware of a tool that supports or planning to add support for more advanced delays? E.g. let through the http response headers and then slowly drizzly the content? Or let the last byte be delayed? What about package drop at a certain point in the response?
I’ve found some interesting behaviour in our applications when delay isn’t uniform during the response.
- kffl 4y agoThat's an interesting use case. I am not aware of any tools that would allow for such content-aware proxying of HTTP traffic with artificial latency introduced in the response headers content parts separately. As of now, speedbump is protocol agnostic - it just proxies the data over TCP without analyzing it (I've used it to proxy HTTP, Postgres, Mongo and AMQP traffic). While the idea of delaying the last byte seems promising at the first glance, especially in the context of retaining protocol agnosticism, the issue is that the proxy doesn't really know which byte is the last one (unless it actually understands the traffic flowing through it - i.e. detecting end of the HTTP response). EDIT: You may want to look into echo-nginx-module, as it allows for adding timeouts between output flushed to the client. Perhaps it could be used in conjunction with NGINX's proxy module.
- spockz 4y agoThanks, sidecars, like envoy and linkerd-proxy, already do protocol detection even if it is just for metrics. Maybe their stack can be augmented to do latency and fault stimulation. For plain http nginx might be an option indeed.