DEV Community

Cover image for APIs Load Testing with Artilley
tkssharma
tkssharma

Posted on

2

APIs Load Testing with Artilley

This Video is talking about how to perform load testing of apis using artillery

config:
  http:
    extendedMetrics: true
  # This is a test server run by team Artillery
  # It's designed to be highly scalable
  target: http://127.0.0.1:3010/restaurants
  tls:
  rejectUnauthorized: false
  phases:
    - duration: 30
      arrivalRate: 1
      rampTo: 5
      name: Warm up phase
    - duration: 30
      arrivalRate: 5
      rampTo: 10
      name: Ramp up load
    - duration: 60
      arrivalRate: 10
      rampTo: 30
      name: Spike phase 
  # Load & configure a couple of useful plugins
  # https://docs.art/reference/extensions
  plugins:
    ensure: {}
    apdex: {}
    metrics-by-endpoint: {}
  apdex:
    threshold: 100
  ensure:
    thresholds:
      - http.response_time.p99: 100
      - http.response_time.p95: 75
scenarios:
  - flow:
      - loop:
          - log: 'New virtual user running'
          - get:
              url: '/search?search_text=uber&page=1&limit=10'
        count: 100
Enter fullscreen mode Exit fullscreen mode

Github
https://github.com/tkssharma/nodejs-api-load-tests

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay