[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76PER8Z0BJMCGQEHBVFYMZ5":3,"skill-same:01M76PER8Z0BJMCGQEHBVFYMZ5":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M76PER8Z0BJMCGQEHBVFYMZ5","testing-load-balancers",null,"Validate load balancer behavior, failover, and traffic distribution.\nUse when performing specialized testing.\nTrigger with phrases like \"test load balancer\", \"validate failover\", or \"check traffic distribution\".","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: testing-load-balancers\ndescription: |\n  Validate load balancer behavior, failover, and traffic distribution.\n  Use when performing specialized testing.\n  Trigger with phrases like \"test load balancer\", \"validate failover\", or \"check traffic distribution\".\n\nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(test:loadbalancer-*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\n---\n# Load Balancer Tester\n\n## Overview\n\nValidate load balancer behavior including traffic distribution algorithms, health check mechanisms, failover scenarios, session persistence, and SSL termination. Supports testing for NGINX, HAProxy, AWS ALB\u002FNLB, GCP Load Balancers, and Kubernetes Ingress controllers.\n\n## Prerequisites\n\n- Load balancer deployed and accessible in a test environment\n- Multiple backend instances running with identifiable responses (hostname headers)\n- HTTP client tools (`curl`, `wrk`, `hey`, or `k6`) for sending test traffic\n- Access to load balancer configuration and health check settings\n- Ability to stop\u002Fstart backend instances to simulate failures\n\n## Instructions\n\n1. Verify basic load balancer connectivity:\n   - Send a request through the load balancer and confirm a backend response.\n   - Check the response includes identifying headers (`X-Backend-Server`, `Server`) to determine which instance served the request.\n   - Verify SSL\u002FTLS termination works correctly (valid certificate, proper redirect from HTTP to HTTPS).\n2. Test traffic distribution algorithm:\n   - Send 100+ sequential requests and record which backend handled each.\n   - For round-robin: verify even distribution across all backends (within 5% tolerance).\n   - For least-connections: verify the least-loaded backend receives new requests.\n   - For weighted: verify traffic ratio matches configured weights.\n3. Validate health check behavior:\n   - Stop one backend instance.\n   - Verify the load balancer detects the failure within the configured health check interval.\n   - Confirm subsequent requests are routed only to healthy backends (zero errors).\n   - Restart the backend and verify it is returned to the pool after passing health checks.\n4. Test failover scenarios:\n   - Stop all backends except one and verify the remaining backend handles all traffic.\n   - Stop all backends and verify the load balancer returns a 502 or 503 error (not hang).\n   - Simulate slow backend responses and verify timeout behavior.\n5. Validate session persistence (sticky sessions):\n   - Send multiple requests with the same session cookie.\n   - Verify all requests route to the same backend instance.\n   - Verify a new session (no cookie) can route to any backend.\n6. Test connection draining:\n   - Start a long-running request, then remove the backend from the pool.\n   - Verify the in-flight request completes successfully.\n   - Verify new requests route to remaining backends.\n7. Document all results with request\u002Fresponse evidence and timing data.\n\n## Output\n\n- Traffic distribution report showing request counts per backend instance\n- Health check failover timeline with detection and recovery durations\n- Session persistence validation results\n- SSL\u002FTLS certificate and configuration verification\n- Load balancer behavior summary with pass\u002Ffail for each test scenario\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| All requests hit the same backend | Session affinity enabled unintentionally or DNS caching | Disable sticky sessions for distribution tests; use different source IPs; bypass DNS cache |\n| Health check passes but backend is unhealthy | Health check endpoint does not reflect actual application health | Configure health checks to hit a deep endpoint that verifies database connectivity |\n| 502 Bad Gateway during failover | Health check interval too long; load balancer still routing to failed backend | Reduce health check interval and failure threshold; verify deregistration delay settings |\n| SSL certificate error | Certificate does not match domain or is expired | Verify certificate SAN entries; check expiration date; ensure full certificate chain is configured |\n| Connection refused on backend port | Firewall or security group blocking load balancer to backend traffic | Verify security group rules allow traffic from load balancer subnet; check backend listen address |\n\n## Examples\n\n**Traffic distribution test with curl:**\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\ndeclare -A counts\nfor i in $(seq 1 100); do\n  backend=$(curl -s -H \"Host: app.test.com\" http:\u002F\u002Flb.test.com\u002Fhealth \\\n    | jq -r '.hostname')\n  counts[$backend]=$(( ${counts[$backend]:-0} + 1 ))\ndone\necho \"Traffic distribution:\"\nfor backend in \"${!counts[@]}\"; do\n  echo \"  $backend: ${counts[$backend]} requests\"\ndone\n```\n\n**Failover test sequence:**\n```bash\nset -euo pipefail\n# 1. Verify both backends serve traffic\ncurl -s http:\u002F\u002Flb.test.com\u002Fhealth  # Backend A\ncurl -s http:\u002F\u002Flb.test.com\u002Fhealth  # Backend B\n\n# 2. Stop Backend A\ndocker stop backend-a\n\n# 3. Verify all traffic goes to Backend B (no errors)\nfor i in $(seq 1 10); do\n  curl -sf http:\u002F\u002Flb.test.com\u002Fhealth || echo \"FAIL: request $i\"\ndone\n\n# 4. Restart Backend A and verify it rejoins\ndocker start backend-a\nsleep 10  # Wait for health check interval\ncurl -s http:\u002F\u002Flb.test.com\u002Fhealth  # Should see Backend A again\n```\n\n**k6 load test against load balancer:**\n```javascript\nimport http from 'k6\u002Fhttp';\nimport { check } from 'k6';\n\nexport const options = { vus: 50, duration: '30s' };\n\nexport default function () {\n  const res = http.get('http:\u002F\u002Flb.test.com\u002Fapi\u002Fdata');\n  check(res, {\n    'status is 200': (r) => r.status === 200,  # HTTP 200 OK\n    'response time \u003C 500ms': (r) => r.timings.duration \u003C 500,  # HTTP 500 Internal Server Error\n  });\n}\n```\n\n## Resources\n\n- NGINX load balancing: https:\u002F\u002Fdocs.nginx.com\u002Fnginx\u002Fadmin-guide\u002Fload-balancer\u002Fhttp-load-balancer\u002F\n- HAProxy documentation: https:\u002F\u002Fwww.haproxy.org\u002Fdownload\u002F2.9\u002Fdoc\u002Fconfiguration.txt\n- AWS ALB documentation: https:\u002F\u002Fdocs.aws.amazon.com\u002Felasticloadbalancing\u002Flatest\u002Fapplication\u002F\n- k6 load testing: https:\u002F\u002Fgrafana.com\u002Fdocs\u002Fk6\u002Flatest\u002F\n- hey HTTP load generator: https:\u002F\u002Fgithub.com\u002Frakyll\u002Fhey","# Load Balancer Tester\n\n## Overview\n\nValidate load balancer behavior including traffic distribution algorithms, health check mechanisms, failover scenarios, session persistence, and SSL termination. Supports testing for NGINX, HAProxy, AWS ALB\u002FNLB, GCP Load Balancers, and Kubernetes Ingress controllers.\n\n## Prerequisites\n\n- Load balancer deployed and accessible in a test environment\n- Multiple backend instances running with identifiable responses (hostname headers)\n- HTTP client tools (`curl`, `wrk`, `hey`, or `k6`) for sending test traffic\n- Access to load balancer configuration and health check settings\n- Ability to stop\u002Fstart backend instances to simulate failures\n\n## Instructions\n\n1. Verify basic load balancer connectivity:\n   - Send a request through the load balancer and confirm a backend response.\n   - Check the response includes identifying headers (`X-Backend-Server`, `Server`) to determine which instance served the request.\n   - Verify SSL\u002FTLS termination works correctly (valid certificate, proper redirect from HTTP to HTTPS).\n2. Test traffic distribution algorithm:\n   - Send 100+ sequential requests and record which backend handled each.\n   - For round-robin: verify even distribution across all backends (within 5% tolerance).\n   - For least-connections: verify the least-loaded backend receives new requests.\n   - For weighted: verify traffic ratio matches configured weights.\n3. Validate health check behavior:\n   - Stop one backend instance.\n   - Verify the load balancer detects the failure within the configured health check interval.\n   - Confirm subsequent requests are routed only to healthy backends (zero errors).\n   - Restart the backend and verify it is returned to the pool after passing health checks.\n4. Test failover scenarios:\n   - Stop all backends except one and verify the remaining backend handles all traffic.\n   - Stop all backends and verify the load balancer returns a 502 or 503 error (not hang).\n   - Simulate slow backend responses and verify timeout behavior.\n5. Validate session persistence (sticky sessions):\n   - Send multiple requests with the same session cookie.\n   - Verify all requests route to the same backend instance.\n   - Verify a new session (no cookie) can route to any backend.\n6. Test connection draining:\n   - Start a long-running request, then remove the backend from the pool.\n   - Verify the in-flight request completes successfully.\n   - Verify new requests route to remaining backends.\n7. Document all results with request\u002Fresponse evidence and timing data.\n\n## Output\n\n- Traffic distribution report showing request counts per backend instance\n- Health check failover timeline with detection and recovery durations\n- Session persistence validation results\n- SSL\u002FTLS certificate and configuration verification\n- Load balancer behavior summary with pass\u002Ffail for each test scenario\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|---------|\n| All requests hit the same backend | Session affinity enabled unintentionally or DNS caching | Disable sticky sessions for distribution tests; use different source IPs; bypass DNS cache |\n| Health check passes but backend is unhealthy | Health check endpoint does not reflect actual application health | Configure health checks to hit a deep endpoint that verifies database connectivity |\n| 502 Bad Gateway during failover | Health check interval too long; load balancer still routing to failed backend | Reduce health check interval and failure threshold; verify deregistration delay settings |\n| SSL certificate error | Certificate does not match domain or is expired | Verify certificate SAN entries; check expiration date; ensure full certificate chain is configured |\n| Connection refused on backend port | Firewall or security group blocking load balancer to backend traffic | Verify security group rules allow traffic from load balancer subnet; check backend listen address |\n\n## Examples\n\n**Traffic distribution test with curl:**\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\ndeclare -A counts\nfor i in $(seq 1 100); do\n  backend=$(curl -s -H \"Host: app.test.com\" http:\u002F\u002Flb.test.com\u002Fhealth \\\n    | jq -r '.hostname')\n  counts[$backend]=$(( ${counts[$backend]:-0} + 1 ))\ndone\necho \"Traffic distribution:\"\nfor backend in \"${!counts[@]}\"; do\n  echo \"  $backend: ${counts[$backend]} requests\"\ndone\n```\n\n**Failover test sequence:**\n```bash\nset -euo pipefail\n# 1. Verify both backends serve traffic\ncurl -s http:\u002F\u002Flb.test.com\u002Fhealth  # Backend A\ncurl -s http:\u002F\u002Flb.test.com\u002Fhealth  # Backend B\n\n# 2. Stop Backend A\ndocker stop backend-a\n\n# 3. Verify all traffic goes to Backend B (no errors)\nfor i in $(seq 1 10); do\n  curl -sf http:\u002F\u002Flb.test.com\u002Fhealth || echo \"FAIL: request $i\"\ndone\n\n# 4. Restart Backend A and verify it rejoins\ndocker start backend-a\nsleep 10  # Wait for health check interval\ncurl -s http:\u002F\u002Flb.test.com\u002Fhealth  # Should see Backend A again\n```\n\n**k6 load test against load balancer:**\n```javascript\nimport http from 'k6\u002Fhttp';\nimport { check } from 'k6';\n\nexport const options = { vus: 50, duration: '30s' };\n\nexport default function () {\n  const res = http.get('http:\u002F\u002Flb.test.com\u002Fapi\u002Fdata');\n  check(res, {\n    'status is 200': (r) => r.status === 200,  # HTTP 200 OK\n    'response time \u003C 500ms': (r) => r.timings.duration \u003C 500,  # HTTP 500 Internal Server Error\n  });\n}\n```\n\n## Resources\n\n- NGINX load balancing: https:\u002F\u002Fdocs.nginx.com\u002Fnginx\u002Fadmin-guide\u002Fload-balancer\u002Fhttp-load-balancer\u002F\n- HAProxy documentation: https:\u002F\u002Fwww.haproxy.org\u002Fdownload\u002F2.9\u002Fdoc\u002Fconfiguration.txt\n- AWS ALB documentation: https:\u002F\u002Fdocs.aws.amazon.com\u002Felasticloadbalancing\u002Flatest\u002Fapplication\u002F\n- k6 load testing: https:\u002F\u002Fgrafana.com\u002Fdocs\u002Fk6\u002Flatest\u002F\n- hey HTTP load generator: https:\u002F\u002Fgithub.com\u002Frakyll\u002Fhey",{"name":5,"author":24,"license":15,"version":25,"description":26,"allowed-tools":27,"compatible-with":28},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Validate load balancer behavior, failover, and traffic distribution.\nUse when performing specialized testing.\nTrigger with phrases like \"test load balancer\", \"validate failover\", or \"check traffic distribution\".\n","Read, Write, Edit, Grep, Glob, Bash(test:loadbalancer-*)","claude-code, codex, openclaw","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill testing-load-balancers",{"tool":41,"command":42},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill testing-load-balancers",{"tool":44,"command":45},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill testing-load-balancers","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002FSKILL.md",true,[49,55,59,63,67,73],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Fexample_config.conf","ASSET","资产文件",2702,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002Fassets\u002Fexample_config.conf",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"assets\u002FREADME.md",302,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002Fassets\u002FREADME.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"assets\u002Freport_template.html",5508,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002Fassets\u002Freport_template.html",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"assets\u002Ftest_template.json",1934,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002Fassets\u002Ftest_template.json",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002FREADME.md","REFERENCE","参考文档",64,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002Freferences\u002FREADME.md",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"scripts\u002FREADME.md","SCRIPT","脚本",442,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Ftesting-load-balancers\u002Fscripts\u002FREADME.md",[80,87,94,101,108,116],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]