Giter Club home page Giter Club logo

locust-serverless's Introduction

Locust Serverless

This app provides a quick and easy way to run Locust based load tests on Azure Cloud (Azure Functions).

All the resources required to run a function app are deployed by the ARM template. The deployment uses site extensions to install a custom python runtime and setup code deployment from this github repository. Once everything is deployed succesfully, you will have an API endpoint which can be used to trigger an ad-hoc load test.

Deploy to Azure

Example

Request

POST https://<your_app_name>.azurewebsites.net/api/LocustSwarm
{
    "url": "http://www.example.com",
    "hatch_rate": 1,
    "num_requests": 10,
    "num_clients": 5
}

Response

[
    {
        "url": [
            "/",
            "GET"
        ],
        "min_response_time": 93,
        "median_response_time": 98,
        "max_response_time": 1296,
        "total_rps": 3.6185047752716208
    }
]

Locust

Locust is an open source load testing tool. It uses a simple python based code to define user behaviour and can be used to swarm host applications/websites with millions of simultaneous users.

Azure Functions (Serverless computing)

Azure Functions provide a quick way to run small pieces of code on a highly scalable cloud infrastructure.

ARM Template

ARM template (azuredeploy.json) deploys all the resources required to setup an Azure Function:

  • App Service Plan (Consumption plan): Azure functions have a default timeout of 5 mins, which can be increased to upto 10 mins (as of writing this). If you to run your tests for a longer duration then choose a Fixed App Service plan.
  • Function App
  • Storage Account

References

locust-serverless's People

Contributors

amanvirmundra avatar

Stargazers

Manohar CM avatar Steven Borg avatar Sanhaji Omar avatar Ryo Lambert avatar  avatar  avatar

Watchers

 avatar  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.