udoschneider

udoschneider

I’m struggling to understand a problem I’m facing, and I’m not sure if there’s an existing solution.

In the project I’m working on, we need to create embeddings using Bumblebee in conjunction with pgvector. Currently, all nodes in the cluster are running the same release. However, with the new requirements for embeddings generation, I want some nodes to have more powerful GPUs. These nodes will detect the presence of a GPU using an environment variable and will start the Bumblebee Serving.

The core idea is that all nodes can request embeddings generation, but the actual worker processes will only run on the GPU nodes.

I’m looking for a solution that combines a distributed registry with something like Poolboy, which would allow for round-robin or other load balancing on the registered processes. I’ve looked into HordeRegistry, but it seems to be designed for single processes only.

I have some ideas for building a custom solution from scratch, but I have a feeling that my requirements—such as service discovery and load distribution—might be met with an off-the-shelf solution.

Do you have any pointers?

Thanks,

Udo

Showing Posts 1 to 10

hubertlepicki

hubertlepicki

I’d default to Oban, and run some queues only on selected nodes.

udoschneider

udoschneider OP

In my opinion, the main limitation is that we need embedding generation to be available as a function call. However, you bring up a valid point—having dedicated queues specifically for the GPU nodes and wrapping the job generation in function calls that wait for job completion could be a solution.

hubertlepicki

hubertlepicki

udoschneider

udoschneider OP

Didn’t know about the Relay Plugin. Maybe going ObanPro is the way then …

hubertlepicki

hubertlepicki

it’s pretty good. Make sure the latency is acceptable for your use case. The performance should be there but sometimes there’s a little bit of latency before the job starts executing.

Horde could also work. I used it for similar use case with not Horde.Registry but Horde.DynamicSupervisor — Horde v0.10.0 for starting supervised processes and Horde.Registry — Horde v0.10.0 for their name registration and lookup.

In my experience Oban approach will be easier to get working right, without weird bugs.

udoschneider

udoschneider OP

Regarding Horde.DynamicSupervisor, I initially explored it but decided against using it because all the distribution strategies I encountered aimed to distribute tasks among all nodes. However, I just realized that by implementing my own strategy using the Horde.DistributionStrategy behavior to distribute tasks specifically among GPU nodes, I might achieve what I need. This sounds intriguing—thanks for the suggestion!

hubertlepicki

hubertlepicki

Not to intentionally derail your efforts but just come up with another idea. I have not used Flame but it kinda seems to fit your use case. I don’t know if there are backends that would suit you, however, and I never used it. Have a look at least:

https://github.com/phoenixframework/flame

udoschneider

udoschneider OP

Feel free to derail as much as you want; my line of thinking was already stuck.

Yes, I did consider FLAME, but I ultimately ruled it out because of the usage pattern. We need to generate embeddings consistently and predictably. My impression of FLAME is that it’s mainly designed for “spot” functions, where the startup time is minimal compared to the overall runtime.

hubertlepicki

hubertlepicki

sir, please do not encourage me. I ended up discussing medieval literature and Don Quixote in particular the last time. On this forum.

jstimps

jstimps

I think you could get it done with a Ra state machine. The state machine could straightforwardly be the distributed registry. You can add in the load balancer piece via custom logic in the query path.

https://github.com/rabbitmq/ra

There’s an Elixir project that I’ve not tried yet but it’s a long this same vein. It does the registry part, but not sure if it currently does the load balancing part.

https://github.com/eliasdarruda/ra-registry

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews