simulation of network errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

simulation of network errors

Christian Haider

Hi,

 

does anybody have experience, ideas or code for simulating network errors and failures?

 

My software uses server on the internet and I would like to have it robust against network problems. Unfortunately, this is not so easy to program without seeing the errors life.

There could be problems:

-          with the local drivers

-          with the LAN (this I could simulate by plugging the wire)

-          with the router (DNS)

-          with the provider

-          with the remote server

-          (and probably a lot more)

 

Ideally I would like to have a little package where these different conditions could be simulated in the image.

 

Any takers?

 

                Christian


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: simulation of network errors

Mark Pirogovsky-3
Christian,
Many years ago at Bell Labs we had some  hardware to create and test any kind of  adverse network conditions, delays, dropped packets, disconnects, bandwidth instabilities, etc.  That kind of setup may be very expensive for the smaller organizations. 

Recently I had to make my application network aware and be able to handle various networks issues.   

When I needed to debug the network I use software firewall program called  Zone Alarm on Windows XP computer.  It allows full access control for the individual program.  With that program you can manually simulate time outs, no DNS access, etc.

On the client side enclose your internet access into the error handles something along the line:

   
[you code here ] on: OSErrorHolder errorSignal , Net.HttpException, Error do:[:eX|  here you can examine the exception and take an appropriate actions]


if you want to simulate various conditions just raise one of the subclasses of the OSErrorHolder and handle them appropriately.

To see what things being handled review method OSErrorHolder initNamedSignals for the error conditions reported by OS and WinSock.dll

To check if the computer is connected to the network you may need to call appropriate Win32 API(s)  as well.

My 0.02$ on the subject.

--
Mark Pirogovsky

Christian Haider wrote:

Hi,

 

does anybody have experience, ideas or code for simulating network errors and failures?

 

My software uses server on the internet and I would like to have it robust against network problems. Unfortunately, this is not so easy to program without seeing the errors life.

There could be problems:

-          with the local drivers

-          with the LAN (this I could simulate by plugging the wire)

-          with the router (DNS)

-          with the provider

-          with the remote server

-          (and probably a lot more)

 

Ideally I would like to have a little package where these different conditions could be simulated in the image.

 

Any takers?

 

 vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: simulation of network errors

Julian Fitzell-4
In reply to this post by Christian Haider
Re: [vwnc] simulation of network errors I’ve been reading Continuous Delivery by Jez Humble and David Farley. They have a section talking a bit about testing for network errors but it doesn’t go into a lot of detail. The basic suggestion was to have stub services running on different ports, each of which simulates a different network error condition. Some of these could be generic (e.g. opening the socket and not responding), while others would probably be specific to your own services (e.g. getting half way through sending a message and then disconnection).

Julian

On 11-04-10 10:31 AM, "Christian Haider" <Christian.Haider@...> wrote:

Hi,
 
does anybody have experience, ideas or code for simulating network errors and failures?
 
My software uses server on the internet and I would like to have it robust against network problems. Unfortunately, this is not so easy to program without seeing the errors life.
There could be problems:
-          with the local drivers

-          with the LAN (this I could simulate by plugging the wire)

-          with the router (DNS)

-          with the provider

-          with the remote server

-          (and probably a lot more)


Ideally I would like to have a little package where these different conditions could be simulated in the image.
 
Any takers?
 
                Christian


_______________________________________________
vwnc mailing list
vwnc@...
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: simulation of network errors

Kooyman, Les
Re: [vwnc] simulation of network errors
I wonder if I am out of place mentioning Emulab software?
 
A colleague mentioned to me the other day that they were using it with some success, but perhaps it is overkill for your needs, or otherwise inappropriate.
 
Les

From: [hidden email] on behalf of Julian Fitzell
Sent: Wed 4/13/2011 6:58 AM
To: Christian Haider; [hidden email]
Subject: Re: [vwnc] simulation of network errors

I’ve been reading Continuous Delivery by Jez Humble and David Farley. They have a section talking a bit about testing for network errors but it doesn’t go into a lot of detail. The basic suggestion was to have stub services running on different ports, each of which simulates a different network error condition. Some of these could be generic (e.g. opening the socket and not responding), while others would probably be specific to your own services (e.g. getting half way through sending a message and then disconnection).

Julian

On 11-04-10 10:31 AM, "Christian Haider" <Christian.Haider@...> wrote:

Hi,
 
does anybody have experience, ideas or code for simulating network errors and failures?
 
My software uses server on the internet and I would like to have it robust against network problems. Unfortunately, this is not so easy to program without seeing the errors life.
There could be problems:
-          with the local drivers

-          with the LAN (this I could simulate by plugging the wire)

-          with the router (DNS)

-          with the provider

-          with the remote server

-          (and probably a lot more)


Ideally I would like to have a little package where these different conditions could be simulated in the image.
 
Any takers?
 
                Christian


_______________________________________________
vwnc mailing list
vwnc@...
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: simulation of network errors

mkobetic
In reply to this post by Christian Haider
On the free (as in beer) side, any recent linux distro has traffic control/shaping facilities built into the kernel, which can be controlled via the 'tc' command. It could be a bit dense to wrap your head around, but that might be unavoidable, depending on what sort of scenarios you want to emulate.

You might be able to cover a good deal of the scenarios at the smalltalk level (e.g. by wrapping the socket access with layers that could introduce artificial delays, drop data, etc). But that probably won't be quite the same as having it happen at the OS level. For example, with TCP, if packet doesn't arrive, you'll get an error, not a hole in your data.

I'm not sure how to simulate DNS failures, although generally those would exhibit as a long delay and then an error, so maybe there's not that much to test there, beyond simply attempting to connect a non-existent domain. I think the first step you need to take is to figure out the list of exact conditions you want to emulate and then decide how.

HTH,

Martin


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: simulation of network errors

mkobetic
In reply to this post by Christian Haider
[hidden email] wrote:

> On the free (as in beer) side, any recent linux distro has traffic control/shaping facilities built into the kernel, which can be controlled via the 'tc' command. It could be a bit dense to wrap your head around, but that might be unavoidable, depending on what sort of scenarios you want to emulate.

If you want to look into this, the netem site could be useful too:

http://www.linuxfoundation.org/collaborate/workgroups/networking/netem

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc