Skip to content
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

Contact Ivan Frolov about refactoring note in the SlowDown component #8

Open
witherspore opened this issue Dec 5, 2013 · 1 comment
Labels

Comments

@witherspore
Copy link
Contributor

This component is similar to Delay. However, rather than creating latency, SlowDown simulates severe bandwidth problems or server side CPU/Memory issues in a response. Where Delay pauses the response, then sends it back all at once, SlowDown trickles the bytes back.

First, Ivan should be contacted,

Also, this component should probably be more user friendly in configuration. Milliseconds per byte is good, but it would nice to be able to specify the total time we'd like it Slowed, then divide the bytes evenly into that time period. For instance, lets have a 50KB response come back in 5 seconds, which works out to 10 bytes per millisecond, but its easier to set up in testing etc where we may not know the file size.

@adonciu
Copy link

adonciu commented Jan 14, 2014

A new Delay handler (slow-light component) have been developed. This new handler was designed with the idea to unify in a way both functionalities provided by initial Delay and SlowDown component.

Handler name - com.tacitknowledge.slowlight.proxyserver.handler.DelayChannelHandler

Because we don't know what will be the size of the data to be sent it is seem to be easier and flexible to express this configuration as max data fragment size and delay between data fragments, so this way we can say for example we want no more than 10 bytes to be send per defined delay (milliseconds, seconds, etc.).

DelayChannelHandler could be configured from two perspectives:
max data size - defines the size of data fragment that should exit from this handler
delay - as its name suggests, it defines the delay which must be applied between data fragments

Both handler parameters described above are independent and could be set to 0 which will disable that particular parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants