26

Managed a 97% reduction in bandwidth usage for our internal host monitoring tool by converting the dashboard from using AJAX polling to websocket events.

Completely unnecessary but wanted an excuse to do some development with websockets. (:

Comments
  • 0
    gRPC is fun and best option
  • 1
    Saving 97% of the bandwidth used is not unnessesary as that bandwidth can be used to support more users or reduce costs for using less bandwidth.

    How was the Ajax structured, longpoll or individuele request every 1 second(or more)?
  • 0
    @darkwind unfortunately it doesn't appear to have a JavaScript implementation and this is a web dashboard.
  • 0
    @kwilliams gRPC can run over JS.

    https://grpc.io/blog/...

    It just needs a proxy gRPC-web.
  • 0
    @max19931 still not seeing the advantage of gRPC over native websockets with well defined, JSON based packages (C# backend, TypeScript frontend).
  • 1
    @kwilliams @darkwind

    "Best" option.

    I really wanna take a frying pan and hit you with it...

    There is hardly a best approach unless you do a very in depth analysis.

    GRPC is nice, without a question.

    It is highly optimized for the use case of "making the most of bandwidth" - which is for companies like Google / ... the most important criteria.

    For any regular web application, small service or anything else that doesn't do much it's less important.

    What the author did, which was a wise choice, is take the low hanging fruit and replace a constant polling approach with an even driven approach.

    That's a change of paradigm. Websockets are still the common HTTP - thus not even the technology changes.

    Putting GRPC inside is an entirely different thing.

    It's changing technology, transport and paradigm.

    Extremely costly for what won't provide a meaningful benefit in a regular standalone app that probably doesn't have a high frequency usage...

    "Best" option is what triggered me here, as "best" would mean burning time and money with most likely no gain (yes it will be faster, yes it will have less traffic - but most likely no one cares (except for the invoice for hours spent)).
  • 0
    @IntrusionCM

    The OP said it was "unnecessary" and that he just wanted to do some dev with websockets. As there's a dramatic increase in performance, I think that can be said to have gone well. No-one's spending time on an "in-depth analysis", which truly would be a waste of effort and resource.
  • 0
    @spongegeoff you should have read the fine print.

    My comment was about GRPC - not about what the author did.

    Reread it. :)
  • 0
    @IntrusionCM

    Still can't see any reason for wanting to hit kwilliams with a frying pan?
  • 0
    @spongegeoff that was meant for dark winds comment regarding best option.

    My bad, brain is funky fluffy at the moment.
Add Comment