Load Testing with Security
Load Testing with Security
Perform load testing while monitoring security:
# Install Apache Bench
sudo apt install apache2-utils
# Basic load test
ab -n 10000 -c 100 -k https://example.com/
# Test with authentication
ab -n 1000 -c 50 -A username:password https://example.com/secure/
# Siege for more realistic testing
sudo apt install siege
# Create URL file
cat > urls.txt << EOF
https://example.com/
https://example.com/page1
https://example.com/page2
https://example.com/api/endpoint
EOF
# Run siege test
siege -c 100 -t 60s -f urls.txt
# Monitor during load test
watch -n 1 'netstat -an | grep -c ESTABLISHED; free -m | grep Mem; uptime'