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

The Fastest, Most Accurate API for Voice AI

Ad Image

Building an AI Agent that needs to deliver human-like conversations? | Speechmatics’ real-time ASR is available in 50 languages and can understand speech in a fraction of a second.

Try Free

Top comments (0)

Sentry workshop image

Sick of your mobile apps crashing?

Let Simon Grimm show you how to fix them without the guesswork. Join the workshop and get to debugging.

Save your spot →

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay