GithubHelp home page GithubHelp logo

gatling-raidboss-cloudstate's Introduction

Cloudstate Gatling Loadtest example

What is this?

This is a sample of using Gatling to run a load test against Cloudstate services. Cloudstate is a specification, protocol, and reference implementation for providing distributed state management patterns suitable for Serverless computing.

Getting started

If you deploy the sample shopping cart js-shopping-cart you can use this repository to run a load test against it, that tests various functions.

Running the shopping cart load test

In sbt

gatling-it:testOnly shoppingcart.ShoppingCartSimulation1

Running a load test against your own service

  1. Add the protobuf files for your service API in src/main/protobuf
  2. Copy the folder src/it/scala/shoppingcart and rename it to match your service
  3. Make a gatling test copying the example from ShoppingCartSimulation1.scala that calls your endpoints

You may need to consult the Gatling documumentation to explore its full range of functionality.

Technical notes

This project uses Gatling as a plugin along with grpc to handle the protobuf compilation and gatling-grpc so that we can write Gatling load tests over gRPC instead of HTTP.

Run all simulations

> gatling:test

Run the shopping cart simulation from sbt

sbt "gatling-it:testOnly shoppingcart.ShoppingCartSimulation1"

Run the shopping cart simulation at the command line and direct to a particular server. Note that if you are running the shopping cart service in Kubernetes cluster, you need to port forward from the akka-sidecar container so you can access it directly with the load test. (The load test uses gRPC not grpc-web protocol).

GATLING_PORT=[PORT] GATLING_USERS=[NUM USERS] GATLING_HOST=[YOUR HOST] sbt gatling-it:testOnly shoppingcart.ShoppingCartSimulation1

List all tasks

> tasks gatling -v

References

https://github.com/gatling/gatling-sbt-plugin-demo https://github.com/phiSgr/gatling-grpc https://medium.com/@georgeleung_7777/a-demo-of-gatling-grpc-bc92158ca808

gatling-raidboss-cloudstate's People

Contributors

justinhj avatar kazimir-malevich avatar notdryft avatar pdalpra avatar slandelle avatar

Watchers

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