Coder Social home page Coder Social logo

Scale out using nats about cassowary HOT 3 CLOSED

rogerwelin avatar rogerwelin commented on May 20, 2024
Scale out using nats

from cassowary.

Comments (3)

rogerwelin avatar rogerwelin commented on May 20, 2024

Hi @gedw99 and thanks for the suggestion. I have very limited working experience with Nats. If you have a suggested workflow (for example the one described above) I would be very interested in a PR with updated examples in the README

from cassowary.

gedw99 avatar gedw99 commented on May 20, 2024

i think its only slight changes...

https://github.com/rogerwelin/cassowary#distributed-load-testing:

K8 is just the envelope for the cloud infrastructure and nothing to do with if we use NATS of not. Good news.

We can embed the NATS server. Just a bool flag at startup. Makes things easy for people to not have to run another server.

  • if the "embedded nats" flag is false, the cli just needs the url: "localhost:4422".
  • nats jetstream can run as InMemory mode, so on K8( there is no volume management needed ).

We can store results over time inside NATS the NATS KV and OBJ store.

  • works with embedded or non embedded mode.

JOBS

First, the easiest way is to add a NATS file slurp mode. Keep the existing Http one:

./cassowary run -u http://localhost:8000 -c 1 -f urlpath.txt
  • client pushes urlpath.txt and args to nats handler, which then creates a nats queue for each line in the URL list.
  • all other clients are sent a job off the queue, do the work and submit those back to the NATS KV.

Starting Load Test with 100 requests using 10 concurrent users

./cassowary run -u http://localhost:8000 -c 10 -n 100 -f urlpath.txt
  • same as above, with the NATS job handler ensuring concurrency and affinity.

Prom Metrics

We can store all cassowary metrics as Prom style in NATS too: https://github.com/kmpm/promnats.go

Historgram / boxplots

  • same as above except the outputs go back to NATS KV.
  • each client can display the plots in real time by subscribing to the nats KV. Or a simple web GUI that shows them in real time.
  • at the end of the job run a worker makes the plots, and stores them in NATS OBJ store, so that you can bring up a job later.

SO basically we are adding the scale out and persistence. You can export out easily too. Some people want to put the outputs in git etc.

Just opening this up for comments.

from cassowary.

gedw99 avatar gedw99 commented on May 20, 2024

will close as seems no one into the idea.

from cassowary.

Related Issues (20)

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.