Spoiler Proxy — Network fault simulator

Spoiler Proxy use cases

There are several network-related use cases for spoiler proxy. You should test all the cases in a safe test environment.

No reply connection

Imagine you have a thread for grabbing some data from remote service. Connection to the remote service is still open and your application waits for a reply which does not never come. If you do not have a timeout for your connection the thread is frozen. If other requests come to your app, other threads will be frozen as well. Soon your application will not have any threads available and will be completely stuck. This scenario may happen in random and it is difficult to test. Luckily with Spoiler Proxy it is easy to test it. Even in automated tests.

Slow connection

Similar to No Reply Connection scenario. Sometimes you can have a problem with concurrent result writes.

Bad reply

Imagine you send a request from the BPM process. The request adds some credits to the user’s account. An error is received. So you repeat your request. Suddenly you have doubled credit balance. Why? The first request was correctly processed, but the error was raised during the reply. This problem causes double call and it can be very painful in some situations.

No connection

With no connection, your service will not work obviously. Some services are not important and in this case, your application must survive the outage of not important services.
Some services are important such as a database. But, if you shut the database connection, will your application be able to automatically reconnect the database when the connection is available again?
You can test these cases with Spoiler Proxy.

Spoiler Proxy presentation (Czech only) on Linux Days 2019.