Skip to main content

Windows EC2 Network Loss

Windows EC2 network loss causes network packet loss on Windows VM for the target EC2 instance(s) using Clumsy. It results in flaky access to the application. It checks the performance of the services running on the Windows VMs under the disrupted network loss conditions.

Windows EC2 Network Loss

tip

When Clumsy is downloaded, the path is exported which is used while executing the experiment.

Use cases

Windows EC2 network loss:

  • Simulates issues within the host network (or microservice) communication across services in different hosts.
  • Determines the impact of degradation while accessing a microservice.
  • Limits the impact (blast radius) to the traffic that you wish to test by specifying the host or IP addresses, if the VM stalls or gets corrupted while waiting endlessly for a packet.
  • Simulates a degraded network with varied percentages of dropped packets between microservices.
  • Simulates loss of access to specific third party (or dependent) services (or components).
  • Simulates network partitions (split-brain) between peer replicas for a stateful application.
  • It may stall the EC2 instance or get corrupted waiting endlessly for a packet.
  • It degrades the network without marking the EC2 instance as unhealthy (or unworthy) of traffic, which is resolved using a middleware that switches traffic based on SLOs (performance parameters).

Prerequisites

  • Ensure that the prerequisites are fulfilled before executing the experiment.
  • Verify that Clumsy is installed on the Windows VM.
  • The EC2 instance should be in a healthy state.

Mandatory tunables

Tunable Description Notes
EC2_INSTANCE_ID ID of the target EC2 instance. For example, i-044d3cb4b03b8af1f. For more information, go to EC2 instance ID.
NETWORK_PACKET_LOSS_PERCENTAGE The percentage of data packets lost during transmission. For example, 100. For more information, go to network packet loss.
REGION The AWS region ID where the EC2 instance has been created. For example, us-east-1.

Optional tunables

Tunable Description Notes
TOTAL_CHAOS_DURATION Duration that you specify, through which chaos is injected into the target resource (in seconds). Default: 60s. For more information, go to duration of the chaos.
AWS_SHARED_CREDENTIALS_FILE Path to the AWS secret credentials. Default: /tmp/cloud_config.yml.
PATH_OF_CLUMSY Path of the Clumsy tool in the VM. For example, C:\Program Files\Clumsy\. For more information, go to path of Clumsy.
RAMP_TIME Period to wait before and after injecting chaos (in seconds). For example, 30 s. For more information, go to ramp time.

Network packet loss

The NETWORK_PACKET_LOSS_PERCENTAGE environment variable specifies the percentage of data packets lost during transmission.

Use the following example to specify network packet loss:

apiVersion: litmuschaos.io/v1alpha1
kind: MachineChaosExperiment
metadata:
name: windows-network-loss
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
infraType: windows
steps:
- - name: windows-network-loss
tasks:
- definition:
chaos:
env:
- name: NETWORK_PACKET_LOSS_PERCENTAGE
value: "100"

Path of Clumsy

The PATH_OF_CLUMSY environment variable specifies the path of the Clumsy tool in the VM.

Use the following example to specify the path of Clumsy:

apiVersion: litmuschaos.io/v1alpha1
kind: MachineChaosExperiment
metadata:
name: windows-network-loss
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
infraType: windows
steps:
- - name: windows-network-loss
tasks:
- definition:
chaos:
env:
# Path of the Clumsy tool in the VM
- name: PATH_OF_CLUMSY
value: 'C:\\Program Files\\Clumsy\\'