Throttle response bandwidth
Send a proportion of responses at 50 kbps to reproduce a slow link between two services.
Configuration
apiVersion: kuma.io/v1alpha1
kind: MeshFaultInjection
metadata:
name: backend-slow-link
namespace: kong-mesh-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: backend
rules:
- default:
http:
- responseBandwidth:
limit: 50kbps
percentage: 25Copied!
type: MeshFaultInjection
name: backend-slow-link
mesh: default
spec:
targetRef:
kind: Dataplane
labels:
app: backend
rules:
- default:
http:
- responseBandwidth:
limit: 50kbps
percentage: 25Copied!
Adjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_fault_injection" "backend_slow_link" {
provider = konnect-beta
type = "MeshFaultInjection"
name = "backend-slow-link"
spec = {
target_ref = {
kind = "Dataplane"
labels = {
app = "backend"
}
}
rules = [
{
default = {
http = [
{
response_bandwidth = {
limit = "50kbps"
percentage = { integer = 25 }
}
}
]
}
}
]
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}
Copied!