toxiproxy-php-client icon indicating copy to clipboard operation
toxiproxy-php-client copied to clipboard

Question about latency.php

Open sktechnology opened this issue 2 years ago • 1 comments

Hi sir, thx for your repository, I'm not sure if I express myself well on the subject due to my imperfect English.

Question about your latency script, the latency time is does the latency apply in both directions ?

When a request is sent, latency, when a request is received, latency ?

if so, that's perfect. if this is not the case is it possible to choose a different latency for the reception and the sending ?

client -> proxy -> latency 100 -> server.

server - lacency 1000 -> proxy -> client.

Thank you for your explanations.

sktechnology avatar Jun 27 '22 17:06 sktechnology

Hi @sktechnology , it is as such:

client -> proxy -> server -> proxy (+latency) -> client

The default latency toxic plug-in does not support latency on both input (before sending request to server) and output (before sending response to client), only on output.

A new toxic plug-in can be created to support this functionality:

  • https://github.com/Shopify/toxiproxy/blob/master/CREATING_TOXICS.md

ihsw avatar Jun 30 '22 14:06 ihsw