Skip to main content
/tayyab/portfolio — zsh
tayyab
TA
> OPERATION: PulseLoad — Live Event Ticketing Platform | STATUS: COMPLETE ✓
Performance Testing

PulseLoad — Live Event Ticketing Platform

Performance testing suite for high-traffic event ticketing platform simulating 250K concurrent users during flash releases.

Manual and Automation QA Engineer

OVERVIEW

A live event ticketing platform that handled extreme traffic surges during major artist ticket releases. My focus was on virtual user ramp testing, queue system behavior validation, race condition detection in seat selection, and payment gateway latency thresholds.

TECH STACK

Testing Tools
k6GrafanaInfluxDBPostmanGitHub ActionsJIRA
Technologies
JavaScriptk6GrafanaREST APIsPostgreSQLLoad TestingSLA Monitoring

THE CHALLENGE

The ticketing platform crashed during high-profile concert releases when 250K+ users hit the site simultaneously. Queue systems became congested, seat selection operations caused race conditions resulting in double-bookings, and payment gateways timed out. No load testing had been performed before launch, leading to revenue loss and customer frustration.

METHODOLOGY

Designed and executed comprehensive performance test suites using k6, simulating realistic user behavior patterns including virtual user ramp scenarios (1K → 50K → 250K VUs), queue wait time behavior, seat selection race condition testing, and payment gateway latency validation under peak load.

TEST STRATEGY

Collaborated with infrastructure and backend teams to establish performance baselines and SLA thresholds. Created k6 test scripts modeling complete ticket purchase flows from search → seat selection → payment. Implemented progressive load testing starting at 1K users and ramping to peak capacity. Set up Grafana dashboards for real-time metric visualization (response times, error rates, throughput). Validated database connection pool limits and identified bottlenecks.

AUTOMATION PIPELINE

Integrated k6 performance tests into GitHub Actions CI pipeline running on every release candidate. Set up InfluxDB time-series database to persist performance metrics. Created Grafana dashboards displaying p50/p95/p99 latencies, error rate trends, and throughput metrics. Automated SLA threshold alerts that trigger if p99 latency exceeds 2 seconds or error rate exceeds 0.1%.

IMPACT METRICS

Peak Traffic Event Reliability

150% avg
⟨ No Load Testing (before)

Platform crashed during high-traffic ticket releases with no prior load testing

⟩ With Load Testing (after)

Validated platform stability for 250K concurrent users before launch

// KEY_METRICS

Transaction Success Rate

No Load Testing (before) 0% (crashed)
With Load Testing (after) 98.5%

Peak Concurrent Users

400%
No Load Testing (before) Unknown
With Load Testing (after) 250K validated

Revenue Lost per Event

100%
No Load Testing (before) $2.1M
With Load Testing (after) $0

Customer Complaints

100%
No Load Testing (before) 50K+
With Load Testing (after) 0 (sold out only)

Payment Gateway Performance Under Load

293% avg
⟨ Untested (before)

Payment processing latency and throughput untested at scale

⟩ Load Tested (after)

Validated payment processing SLAs: p95 < 1.5s, p99 < 2s

// KEY_METRICS

p95 Payment Latency

76%
Untested (before) Unknown
Load Tested (after) 1.2 sec

Payment Throughput

900%
Untested (before) Unknown
Load Tested (after) 5K txn/min

Failed Transactions

96%
Untested (before) 2-3%
Load Tested (after) 0.1%

Timeout Rate

99%
Untested (before) 0.8%
Load Tested (after) 0.01%

Race Condition Detection: Seat Selection

25015% avg
⟨ Manual Testing (before)

Seat double-bookings discovered only after incidents in production

⟩ Automated Race Testing (after)

All race conditions detected before production with 50K+ concurrent testers

// KEY_METRICS

Double-Booking Incidents

100%
Manual Testing (before) 8 per event
Automated Race Testing (after) 0

Detection Time

58%
Manual Testing (before) 2-24 hours
Automated Race Testing (after) <5 min

Concurrent Test Users

99900%
Manual Testing (before) 50
Automated Race Testing (after) 50K+ simulated

Seat Collision Detection

Manual Testing (before) None
Automated Race Testing (after) 100%

CODE SAMPLES

Virtual User Ramp Load Test with k6

Progressive ramp from 1K to 250K users simulating peak traffic event

javascript
JAVASCRIPT_EXECUTION
→ Ready
import http from 'k6/http';
import { check, sleep, group } from 'k6';
import { Rate, Trend } from 'k6/metrics';

// Custom metrics
const errorRate = new Rate('errors');
const ticketPurchaseTime = new Trend('ticket_purchase_duration');
const paymentLatency = new Trend('payment_latency');

export const options = {
  stages: [
    { duration: '2m', target: 1000 },    // 1K users
    { duration: '2m', target: 5000 },    // 5K users
    { duration: '2m', target: 25000 },   // 25K users
    { duration: '2m', target: 50000 },   // 50K users (peak)
    { duration: '2m', target: 250000 },  // 250K users (extreme)
    { duration: '2m', target: 0 },       // Ramp down
  ],
  thresholds: {
    'http_req_duration': ['p(95)<2000', 'p(99)<3000'], // p95 < 2s, p99 < 3s
    'errors': ['rate<0.001'], // Error rate < 0.1%
    'http_req_failed': ['rate<0.01'], // HTTP failure rate < 1%
  },
};

export default function() {
  const eventId = 'CONCERT-2025-MAJOR';
  const userId = `user-${__VU}-${__ITER}`;

  group('Browse Events', function() {
    const browseRes = http.get(`${__ENV.BASE_URL}/api/v1/events/${eventId}`);
    check(browseRes, {
      'event page status 200': (r) => r.status === 200,
      'response time < 500ms': (r) => r.timings.duration < 500,
    });
  });

  group('Search Available Seats', function() {
    const searchRes = http.post(`${__ENV.BASE_URL}/api/v1/seats/search`, 
      JSON.stringify({
        event_id: eventId,
        section: 'A',
        price_range: [50, 500]
      }),
      { headers: { 'Content-Type': 'application/json' } }
    );
    check(searchRes, {
      'search status 200': (r) => r.status === 200,
      'seats found': (r) => JSON.parse(r.body).seats.length > 0,
    });
  });

  sleep(Math.random() * 2 + 1); // User browsing delay

  group('Reserve Seat (Race Condition Prone)', function() {
    const startTime = new Date();
    const reserveRes = http.post(`${__ENV.BASE_URL}/api/v1/seats/reserve`,
      JSON.stringify({
        event_id: eventId,
        seat_id: 'SEAT-A-001',
        user_id: userId
      }),
      { headers: { 'Content-Type': 'application/json' } }
    );
    const duration = new Date() - startTime;
    
    check(reserveRes, {
      'reservation status 200 or 409': (r) => r.status === 200 || r.status === 409,
      'reservation response < 1s': (r) => r.timings.duration < 1000,
    });
    
    if (reserveRes.status !== 200) {
      errorRate.add(1);
      return; // Seat taken, exit flow
    }
  });

  sleep(1);

  group('Process Payment', function() {
    const paymentStart = new Date();
    const paymentRes = http.post(`${__ENV.BASE_URL}/api/v1/checkout/payment`,
      JSON.stringify({
        event_id: eventId,
        amount: 150.00,
        currency: 'USD',
        payment_method: 'credit_card'
      }),
      { 
        headers: { 
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${__ENV.AUTH_TOKEN}`
        } 
      }
    );
    const paymentDuration = new Date() - paymentStart;
    paymentLatency.add(paymentDuration);
    
    check(paymentRes, {
      'payment status 200': (r) => r.status === 200,
      'payment confirms within 2s': (r) => r.timings.duration < 2000,
    });
  });

  sleep(Math.random() + 0.5);
}

Queue System Race Condition Detection

Test seat selection doesn't double-book under concurrent load

javascript
JAVASCRIPT_EXECUTION
→ Ready
import http from 'k6/http';
import { check } from 'k6';
import { Counter } from 'k6/metrics';

const doubleBookAttempts = new Counter('double_book_attempts');
const successfulReservations = new Counter('successful_reservations');

export const options = {
  vus: 50, // 50 concurrent users
  duration: '30s',
  rps: 1000, // 1000 requests per second
};

export default function() {
  const seatId = 'SEAT-LIMITED-STOCK-001'; // Single seat with 10 available
  const eventId = 'CONCERT-2025';
  
  // Simulate 50 users racing to reserve the same seat
  const reserveRes = http.post(
    `${__ENV.BASE_URL}/api/v1/seats/reserve`,
    JSON.stringify({
      event_id: eventId,
      seat_id: seatId,
      quantity: 1,
      user_id: `user-${__VU}`
    }),
    { headers: { 'Content-Type': 'application/json' } }
  );

  const responseBody = JSON.parse(reserveRes.body);
  
  if (reserveRes.status === 200) {
    successfulReservations.add(1);
  } else if (reserveRes.status === 409) {
    // Expected: seat sold out
    check(reserveRes, {
      'conflict response on sold out': (r) => r.status === 409,
    });
  } else if (reserveRes.status === 500) {
    // ERROR: Double-booking detected
    doubleBookAttempts.add(1);
    console.error(`DOUBLE-BOOKING DETECTED: User ${__VU} got status 500`);
  }
  
  check(reserveRes, {
    'no server errors': (r) => r.status < 500,
  });
}

export function handleSummary(data) {
  // Alert if any double-books detected
  const doubleBooks = data.metrics.double_book_attempts.value;
  if (doubleBooks > 0) {
    console.error(`⚠️  CRITICAL: ${doubleBooks} potential double-bookings detected!`);
  }
  const successful = data.metrics.successful_reservations.value;
  console.log(`✓ Successful reservations: ${successful}`);
}

MISSION ACCOMPLISHED

Successfully simulated 250K concurrent users without platform crashes. Validated payment gateway could handle 5K transactions per minute at p95 latency < 1.5 seconds. Queue system maintained FIFO order even under 50K concurrent seat selection attempts. Identified and resolved 8 bottlenecks before production. Peak traffic ticket releases now achieve 98.5% transaction success rate.

// interested?

READY TO BUILD SOMETHING SIMILAR?

Let's discuss how I can implement test automation for your project.

→ Get in Touch
Available for hire