Windows EC2 Network Latency
Windows EC2 network latency causes a network packet delay on Windows VM for the target EC2 instance(s) using Clumsy.
Use cases
- 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).
- It may stall the EC2 instance or get corrupted waiting endlessly for a packet.
- It limits the impact (blast radius) to the traffic that you wish to test, by specifying the IP addresses.
tip
When Clumsy is downloaded, the path is exported which is used while executing the experiment.
Use cases
Windows EC2 network latency:
- Simulates the situation of network delay for dependent processes and microservices running on the application, which degrades their performance.
- Helps verify the application's ability to handle network delays.
- Determines the performance of the application (or process) running on the EC2 instances.
- Simulates a consistently slow network connection between microservices (for example, cross-region connectivity between active-active peers of a given service or across services or poor cni-performance in the inter-pod-communication network).
- Simulates jittery connection with transient latency spikes between microservices.
- Simulates a slow response on specific third party (or dependent) components (or services), and degraded data-plane of service-mesh infrastructure.
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_LATENCY | The network latency (or delay) that you want to introduce during chaos, in milliseconds. | For example, 2000. For more information, go to network latency. |
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 latency
The NETWORK_LATENCY
environment variable specifies the delay induced, in milliseconds.
Use the following example to specify network latency:
apiVersion: litmuschaos.io/v1alpha1
kind: MachineChaosExperiment
metadata:
name: windows-network-latency
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
infraType: windows
steps:
- - name: windows-network-latency
tasks:
- definition:
chaos:
env:
- name: NETWORK_LATENCY
value: "2000"
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-latency
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
infraType: windows
steps:
- - name: windows-network-latency
tasks:
- definition:
chaos:
env:
# Path of the Clumsy tool in the VM
- name: PATH_OF_CLUMSY
value: 'C:\\Program Files\\Clumsy\\'