linkedin / flashback

mock the internet
BSD 2-Clause "Simplified" License
578 stars 54 forks source link

Does Flashback support network delay in playback mode? #9

Open baole opened 7 years ago

baole commented 7 years ago

I want to simulate different network delay in playback mode. Is it doable with Flashback?

sf1152 commented 7 years ago

We don't have use case yet but we can support that. Is this Http or Https? If it's Https, which phase do you want to delay? CONNECT request or SSL or real request?

As a work around, there are a few way to simulate that:

  1. You can create your own match rule and have some logic to delay matching logic. If delay is less than proxy timeout, that's most straight forward way to do
  2. If you want to delay connection flow, you can create your own customized connection flow step and insert in between some connection flow steps to simulate that
  3. If you want to delay real request, you can create customized ProxyModeController so you can delay in data layer.

One goal for flashback is that we want to provide flexibility to users to easily meet their special requirement by defining your own matchrule, connection flow and data flow

ben-oldcom commented 7 years ago

this is a cool and good feature request in my opinion, @sf1152 let's plan to add this.