Code Monkey home page Code Monkey logo

distributed-load-testing-system's Introduction

Distributed-Load-Testing-System

Overview

This repository contains the implementation of a Distributed Load Testing System, designed and built as part of the Big Data Project 2023 at PES University. The system coordinates multiple driver nodes to perform highly concurrent, high-throughput load tests on a web server. The communication between nodes is facilitated using Kafka as the messaging service.

Application Architecture

  • The system comprises Orchestrator and Driver nodes, implemented as separate processes.
  • Orchestrator and Driver nodes communicate via Kafka using specified topics and message formats.
  • The system supports Avalanche and Tsunami testing, with configurable parameters for each test type.
  • Metrics reporting and a scalable architecture for running tests with varying numbers of nodes are integral features.

Solution Approach

Orchestrator Node (load-orchestrator.py)

  • Exposes a REST API for controlling and monitoring tests.
  • Implements a Runtime controller to handle heartbeats, coordinate between driver nodes, and store metrics.
  • Uses Kafka for communication, publishing to topics such as register, test_config, trigger, metrics, and heartbeat.
  • Achieves scalability by supporting a variable number of driver nodes.

Driver Node (load-driver.py)

  • Sends requests to the target web server based on Orchestrator's instructions.
  • Records statistics for response times (mean, median, min, max) and sends results back to the Orchestrator.
  • Implements a communication layer using Kafka, publishing heartbeats and metrics.

Target HTTP Server (target-server.py)

  • Provides endpoints /ping for testing and /metrics for observing request and response counts.
  • Serves as the target web server for load testing.

Client (load-client.py)

  • Allows users to initiate load tests by providing test type, message count per driver, and optional parameters.
  • Sends a POST request to the Orchestrator to start the load test.

Usage

Prerequisites

  • Python (3.x)
  • Kafka (running on localhost:9092)
  • Flask (for Orchestrator and Target Server)

Running the System

  1. Start Kafka and ensure it's accessible on localhost:9092.

  2. Run the Orchestrator node:

    python load-orchestrator.py
  3. Run Driver nodes (for example, two nodes):

    python load-driver.py
  4. Run the Target HTTP Server:

    python target-server.py
  5. Optionally, use the Client to start load tests:

    python load-client.py

Contributors

  • Sakshi S
  • Tarun Sairaj Vepamaninti
  • Swayam Chhaba

Conclusion

Distributed Load Testing System with Kafka. Orchestrator and Driver nodes, scalable tests. Code files (load-orchestrator.py, load-driver.py, load-client.py, target-server.py) and README for easy use.

distributed-load-testing-system's People

Contributors

tereshaa avatar

Stargazers

Puyush Gupta avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.