Code Monkey home page Code Monkey logo

Comments (7)

GiovanniPaoloGibilisco avatar GiovanniPaoloGibilisco commented on August 11, 2024

Adding some info,
When a test is launched in a distributed environment with n "servers" Jmeter starts n exporters and servers, one for each "server". This causes n-1 exceptions on the http listening port of the exporter already being used by the 1 exporter that has been succesfully launched. I see 2 roads ahead here.

  1. Using a single http exporter by implementing the factory pattern.
  2. Being able to launch exporters directly on "server" instances and configure prom to scrape from them. This also offloads jmeter from gathering results.

from jmeter-prometheus-plugin.

chiabre avatar chiabre commented on August 11, 2024

A benefit of the second option is that it will give us for free the possibility to "slice and dice" the data also from the "server" perspective. This could be really usefull to:

  1. keep track of the differences when a test is executed from different (geo)location
  2. spot anomalies in the test farm

Having the same through the first option could result in overlabeling...

from jmeter-prometheus-plugin.

johrstrom avatar johrstrom commented on August 11, 2024

In researching this issue it seems I implemented Remoteable which forced only one instantiation on the client.

It was a mistake, so really this is a bug, we should definitely instantiate on the servers.

from jmeter-prometheus-plugin.

johrstrom avatar johrstrom commented on August 11, 2024

I changed this to a bug because that's what I believe it now to be. I had always intended the server to boot on the server and never send data back to the client.

As I started to create a pull request for a fix branch I noticed you have a branch for BackendClient. Reading the documentation for the interface it says it creates 1 per thread and perhaps more. I think just relying on NoThreadClone is a better approach.

I'm creating the pull request now that will revert the factory @GiovanniPaoloGibilisco had implemented. Once that's sorted, then we can evaluate this branch which already has the UI refactor in it.

I'm in no rush to pull it in quickly.

from jmeter-prometheus-plugin.

GiovanniPaoloGibilisco avatar GiovanniPaoloGibilisco commented on August 11, 2024

From the jmeter developer mail list I was suggested to look at the BackendListenerClient implementation of InfluxDB and Graphite exporters. This branch implements the exporter as a BackendListenerClient but still this relies on the fact that the Client receives samples from the servers. I've also inspected the idea of extending the BackendListener but this is definetly not the way to go.

from jmeter-prometheus-plugin.

johrstrom avatar johrstrom commented on August 11, 2024

Oh I see. With the NoThreadClone or the singleton you had implemented you still boot 1 server per JVM. But, if you're trying to boot multiple servers (JVM/processes) on one single instance (machine) you'll still get port binding errors in either case.

Is that what you were trying to do? If so, you may want to try to use the __Random function and bind to a random port. Of course that doesn't make auto discovery easy, but ideally Jmeter servers and host servers should be 1:1.

from jmeter-prometheus-plugin.

GiovanniPaoloGibilisco avatar GiovanniPaoloGibilisco commented on August 11, 2024

No, I was trying to avoid running multiple http servers inside the JVM with the Jmeter Client. This was a temporary fix due to the fact that multiple instances of the exporter were running on the client instead of running on the server. I would prefer to stick with the default 9270 port and allowing customization.

from jmeter-prometheus-plugin.

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.