Code Monkey home page Code Monkey logo

Comments (3)

dannykopping avatar dannykopping commented on May 25, 2024 1

OK cool, thanks!

I'll be back on this topic next week, and I might put together a PR unless you get to it first πŸ™‚
It doesn't necessarily need to be per-request; I just want to be able answer the question "of all the hedged requests we made, what % of them actually helped?".

from hedgedhttp.

cristaloleg avatar cristaloleg commented on May 25, 2024 1

I did a quick prototype #46 (so no tests) but looks like that's what we want.

If we got a response/result from waitResult and it's successful (resp is not nil) than we can bump a metric for the original (index 0) or hedged (index non-zero).

I will try to cover this with a test tomorrow-ish. Review and thoughts are welcome.

CC: @storozhukBM

from hedgedhttp.

cristaloleg avatar cristaloleg commented on May 25, 2024

Hm, interesting question. The simplest answer is to look at the metrics & compare results for original vs hedged requests. Again as per #18 and custom http.RoundTripper witch collects those stats.

The only thing is that it will report global stats, not per every request (that's how I imagine it's behaviour). Adding no-op ?req_id=XXX to every request can help with request grouping and as a result true metric for each request.

I can try to make a PoC this week unless you're eager ;)

from hedgedhttp.

Related Issues (9)

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.