GithubHelp home page GithubHelp logo

Comments (3)

dennwc avatar dennwc commented on July 21, 2024

I think it may be easier to go from a different angle: keep native drivers single-threaded, but allow running multiple native processes, which are controlled/scaled by Go driver server (the "stdio-to-gRPC proxy" that exists in every driver).

Scaling can be very naive: always keep 1 driver instance alive, if more requests arrive - run more processes inside the same container (up to the number of CPUs). Then, kill them immediately if no other requests are waiting to get a driver. More advance scaling will be done by K8S or other high-level system, allowing to keep the code simple.

This change can also be introduced incrementally, while keeping current bblfshd design.

As the next steps we may drop driver scaling in bblfshd completely and allow running only a single driver per language (multi-process, as proposed). This should still cover existing use case (saturating CPUs of a single server), while allowing to run and scale drivers separately in K8S.

The only missing piece after this is to implement driver discovery for K8S in any suitable way. We may or may not proxy traffic through bblfshd at that point.

from bblfshd.

kuba-- avatar kuba-- commented on July 21, 2024

This part should not touch k8s in any sense. In my opinion it's up to us how many CPU we allow to use (GOMAXPROCS). The whole thing sounds to me like a queueing system which we can implement. And we can handle number of processes which can pull tasks from the queue.
if one routine finished the task and wants to return to the pool we can close it or keep running and pull another task.

from bblfshd.

dennwc avatar dennwc commented on July 21, 2024

I'm mentioning K8S only to illustrate how this change can fit in the whole picture. It's not directly related.

Re: queueing, yes, this is more or less what I propose, at least if you mean implementing it in a Go process and not externally :)

from bblfshd.

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.