Files
2025-11-30 08:23:14 +08:00

62 lines
1.9 KiB
JSON

{
"_comment": "Load Balancer Test Configuration Template",
"test_name": "Example Load Balancer Test",
"description": "Tests traffic distribution and failover capabilities of the load balancer.",
"target_url": "http://your-load-balancer-url.com",
"num_requests": 1000,
"concurrency": 10,
"request_type": "GET",
"request_headers": {
"_comment": "Optional headers to include in each request",
"Content-Type": "application/json",
"X-Test-Header": "lb-tester"
},
"request_body": null,
"distribution_validation": {
"_comment": "Configuration for validating traffic distribution across backend servers",
"enabled": true,
"server_count": 3,
"expected_distribution_tolerance": 0.1,
"distribution_method": "request_count",
"server_identifiers": [
"server1",
"server2",
"server3"
],
"identifier_extraction_method": "header",
"identifier_extraction_header": "X-Server-ID"
},
"failover_testing": {
"_comment": "Configuration for testing failover capabilities",
"enabled": true,
"server_to_fail": "server2",
"failover_wait_time": 10,
"requests_after_failover": 200
},
"sticky_session_verification": {
"_comment": "Configuration for verifying sticky sessions",
"enabled": false,
"session_cookie_name": "JSESSIONID",
"requests_per_session": 10
},
"health_check_testing": {
"_comment": "Configuration for testing health check behavior",
"enabled": false,
"health_check_endpoint": "/health",
"expected_status_code": 200,
"interval": 5,
"duration": 60
},
"assertions": {
"_comment": "Custom assertions to validate the response",
"response_time_max": 200,
"status_code_min": 200,
"status_code_max": 299,
"response_contains": null
},
"reporting": {
"_comment": "Reporting configuration",
"report_format": "json",
"output_file": "lb_test_report.json"
}
}