# Traffic Tester — Website Load Testing & Performance Validation (`apricot_blackberry/traffic-test-to-your-page`) Actor

Send controlled traffic to test your website's performance, CDN caching, and load handling. Find bottlenecks first.

- **URL**: https://apify.com/apricot_blackberry/traffic-test-to-your-page.md
- **Developed by:** [Creator Fusion](https://apify.com/apricot_blackberry) (community)
- **Categories:** Business, Developer tools
- **Security:** Limited permissions
- **Stats:** 6 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 monitoring checks

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Traffic Test to Your Page

**Send controlled traffic to test your website's performance, CDN caching, load handling, and infrastructure limits. Find breaking points before customers do.**

You don't know how your site handles real load until you test it. This actor sends realistic, distributed traffic to your domain and measures how it behaves: response times, throughput, error rates, CSS/JS loading, image optimization, CDN effectiveness, and infrastructure bottlenecks. Identify breaking points, validate CDN config, and optimize before traffic spikes.

### ⚡ What You Get

```
Load Test & Performance Report
├── Target URL: https://yoursite.com
├── Test Configuration
│   ├── Duration: 5 minutes
│   ├── Concurrent Users: 100 (ramped up over 30s)
│   ├── Requests Per Second: 50
│   ├── Geographic Distribution: US, EU, Asia
│   └── Device Mix: Desktop (60%), Mobile (40%)
├── Results Summary
│   ├── Total Requests: 15,000
│   ├── Successful Responses: 14,987 (99.91%)
│   ├── Failed/Errors: 13 (0.09%)
│   └── Status: ✓ Passed
├── Response Time Analysis
│   ├── Avg Response Time: 245ms
│   ├── P50 (Median): 180ms
│   ├── P95: 520ms 👈 95% of users saw this speed or better
│   ├── P99: 1,240ms
│   └── Max: 3,847ms (outlier during spike)
├── Throughput Metrics
│   ├── Requests/Second: 49.8 (target: 50)
│   ├── Bytes Received/Sec: 12.4 MB/s
│   ├── Bytes Sent/Sec: 3.2 MB/s
│   └── Efficiency: Excellent (no queuing)
├── Error Analysis
│   ├── 500 Errors: 8 (database timeout at peak)
│   ├── 502 Errors: 3 (nginx overload)
│   ├── 503 Errors: 2 (graceful degradation)
│   └── Root Cause: Database connection pool maxed at 100
├── Resource Caching Performance
│   ├── CSS Files: 98% cache hit rate
│   ├── JavaScript: 97% cache hit rate
│   ├── Images: 94% cache hit rate
│   ├── Static Assets: Excellent CDN performance
│   └── Dynamic Content: No caching (expected)
├── CDN & Geographic Performance
│   ├── US (East): 145ms avg (excellent)
│   ├── US (West): 182ms avg (good)
│   ├── EU: 320ms avg (acceptable, latency)
│   ├── Asia: 542ms avg (needs optimization or regional CDN)
│   └── Recommendation: Add Asia-Pacific edge locations
└── Bottleneck Analysis
    ├── Database Queries: Slowest component (avg 180ms)
    ├── API Calls: 45ms avg
    ├── Server Rendering: 65ms avg
    └── Optimization Opportunities:
    │   ├── Add database read replica (reduce query time)
    │   ├── Implement caching layer (Redis)
    │   └── Optimize slow queries (3 identified)
    └── Estimated Impact if optimized: -110ms per request
```

### 🎯 Use Cases

- **Pre-Launch Testing**: Before going live, verify your infrastructure handles expected peak load.
- **CDN Validation**: Confirm your CDN is configured correctly. Are assets being cached? Is edge coverage good?
- **Capacity Planning**: Know your infrastructure limits. Can you handle 100 concurrent users? 1000? Where does it break?
- **Performance Optimization**: Identify slowest components. Database? API calls? Large assets? Fix what matters most.
- **Incident Post-Mortems**: Site went down during traffic spike? Run test to reproduce and understand failure.
- **Infrastructure Upgrade Decisions**: Do you need to upgrade your database? Add more servers? Load testing tells you.

### 📊 Sample Output

```json
{
  "test_id": "load_test_abc123",
  "target_url": "https://yoursite.com",
  "test_timestamp": "2024-02-15T10:30:00Z",
  "test_config": {
    "duration_seconds": 300,
    "concurrent_users": 100,
    "ramp_up_time_seconds": 30,
    "requests_per_second": 50,
    "geographic_distribution": ["US", "EU", "Asia"],
    "device_mix": {"desktop": 60, "mobile": 40}
  },
  "overall_results": {
    "total_requests": 15000,
    "successful_requests": 14987,
    "failed_requests": 13,
    "success_rate_percent": 99.91,
    "total_duration_seconds": 300
  },
  "response_time_metrics": {
    "average_ms": 245,
    "p50_ms": 180,
    "p95_ms": 520,
    "p99_ms": 1240,
    "max_ms": 3847
  },
  "throughput_metrics": {
    "requests_per_second": 49.8,
    "bytes_received_per_sec": 12400000,
    "bytes_sent_per_sec": 3200000
  },
  "errors": [
    {
      "status_code": 500,
      "count": 8,
      "error_message": "Database connection timeout",
      "first_occurrence": "2024-02-15T10:32:15Z"
    },
    {
      "status_code": 502,
      "count": 3,
      "error_message": "Bad Gateway - nginx overload"
    }
  ],
  "caching_performance": {
    "css_cache_hit_percent": 98,
    "javascript_cache_hit_percent": 97,
    "image_cache_hit_percent": 94,
    "overall_cdn_effectiveness": "excellent"
  },
  "geographic_performance": [
    {
      "region": "US East",
      "average_response_ms": 145,
      "rating": "excellent"
    },
    {
      "region": "Asia Pacific",
      "average_response_ms": 542,
      "rating": "needs optimization"
    }
  ],
  "bottlenecks": [
    {
      "component": "Database Queries",
      "average_time_ms": 180,
      "percentage_of_total": 73,
      "optimization": "Add read replica, implement caching"
    }
  ],
  "recommendations": [
    "Increase database connection pool from 100 to 200",
    "Add Redis caching layer for frequently-queried data",
    "Deploy edge location in Asia-Pacific region"
  ]
}
```

**Field Descriptions:**

- `response_time_metrics`: P95 is the key metric (what 95% of users experience)
- `throughput_metrics`: Can the server handle expected requests/second?
- `errors`: What breaks first? Database? API? Load balancer?
- `bottlenecks`: Slowest components (target these for optimization)
- `recommendations`: Specific improvements with estimated impact

### 🔗 Integrations & Automation

**Webhook to Monitoring**: Feed load test results into your APM (DataDog, New Relic).

**Email Report**: Detailed PDF report with performance graphs, bottleneck analysis, and recommendations.

**Slack Alerts**: Critical issues found? Slack alert immediately with severity.

**MCP Compatible**: AI agents can analyze results and generate optimization roadmaps.

**REST API**: Schedule recurring load tests, track performance degradation over time.

[See integration docs →](https://docs.apify.com/platform/integrations)

### 🔌 Works Great With

- **[Website Tech Stack Detector](https://apify.com/apricot_blackberry/website-tech-stack-detector)** — Understand your tech stack, then test it under load.
- **[SaaS Status Monitor](https://apify.com/apricot_blackberry/saas-status-monitor)** — Before load testing, confirm your infrastructure dependencies are healthy.
- **[Super Stealth Scraper](https://apify.com/apricot_blackberry/super-stealth-scraper)** — Generate realistic traffic patterns based on actual user behavior.

### 💰 Cost & Performance

**Typical run:** 15,000 requests, 5-minute test, complete performance profile for ~$6.80.

That's **$0.00045 per request** — cheaper than the cost of actual paying customers discovering a broken site.

**Compare to manual:** Hiring a load testing consultant? $5,000+ per test, plus 2 weeks turnaround. We do it in 5 minutes for $6.80. You can test your infra changes daily.

### 🛡️ Built Right

- **Realistic traffic generation** from actual geographies (not single-source spam)
- **Distributed load** from multiple nodes (not local bottleneck)
- **Device simulation** tests both desktop and mobile performance
- **Gradual ramp-up** shows performance degradation as load increases
- **Detailed error tracking** identifies exactly what breaks and when
- **Non-destructive** testing (respects your traffic limits)

***

**Fresh data. Zero guesswork. Be the first to know.**

📧 [Email alerts](https://apify.com/apricot_blackberry/traffic-test-to-your-page) · 🔗 [Webhook triggers](https://docs.apify.com/platform/integrations/webhooks) · 🤖 [MCP compatible](https://docs.apify.com/platform/integrations) · 📡 [API access](https://docs.apify.com/api/v2)

Built by [Creator Fusion](https://apify.com/apricot_blackberry) — OSINT tools that actually work.

# Actor input Schema

## `startUrls` (type: `array`):

URLs to scrape. The swarm will visit each URL with human-like loitering behavior.

## `proxyConfiguration` (type: `object`):

⚠️ RESIDENTIAL PROXIES REQUIRED. Datacenter IPs will be blocked by protected targets.

## `sleeperMode` (type: `boolean`):

Enable sleeper cell behavior (90% idle, 10% extraction). Disabling uses faster standard mode.

## `tier` (type: `string`):

Preset configuration based on your Apify memory allocation. 'hobbyist' = 4GB, 'pro' = 16GB, 'industrial' = 64GB.

## `minConcurrency` (type: `integer`):

Minimum concurrent browsers. Overrides tier preset if set.

## `maxConcurrency` (type: `integer`):

Maximum concurrent browsers. Overrides tier preset if set. Formula: ~4 browsers per GB RAM.

## `maxRequests` (type: `integer`):

Maximum number of pages to scrape per run.

## `sessionRotationCount` (type: `integer`):

Retire browser identity after N successful requests. Lower = more identity changes, higher stealth.

## `loiterTimeMin` (type: `integer`):

Minimum time to 'read' page before extraction. Higher = stealthier, slower throughput.

## `loiterTimeMax` (type: `integer`):

Maximum time to 'read' page before extraction.

## `delayMean` (type: `integer`):

Center of gaussian delay distribution for reading pause.

## `delayStdDev` (type: `integer`):

Spread of gaussian delay distribution. Higher = more variance in timing.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "sleeperMode": true,
  "tier": "pro",
  "maxRequests": 100,
  "sessionRotationCount": 5,
  "loiterTimeMin": 3000,
  "loiterTimeMax": 8000,
  "delayMean": 4500,
  "delayStdDev": 1500
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://example.com"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("apricot_blackberry/traffic-test-to-your-page").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://example.com" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("apricot_blackberry/traffic-test-to-your-page").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call apricot_blackberry/traffic-test-to-your-page --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apricot_blackberry/traffic-test-to-your-page"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3PQXebrFwUcNE4avo/builds/y2UYUWXRFBGBteZrq/openapi.json
