jonator

jonator

Using FLAME with many nodes

FLAME is basically the dream for running AI agents that need system command access such as coding agents. However, I have concerns about scaling to a very high number of nodes (many thousands). I can just write application Elixir code and scalability is batteries included; incredible devx.

With distributed erlang, the default is for the nodes to not run in “hidden” mode and to instead create many-to-many connections to all nodes, which severely limits the overhead of each additional node that is added to the cluster. I noticed this seems to also extend to the default in FLAME as I did not see an option to support hidden node detection. (I may be wrong, was a fairly quick scan).

Would the solution be, in the case of the Fly backend, to run each node using a separate docker image that passes the “-hidden” flag then fork/update FLAME to support usage of nodes(hidden) for spawned workers? (Or maybe this is already achieved somehow). My ideal is the main cluster that runs the web servers and Oban workers for each agent is in the “non hidden” cluster, and they each only know about some number of dedicated node connections running each agent (a hub and spoke architecture).

Regardless, am curious to see what you think. Cheers.

Most Liked

paulsabou

paulsabou

Maybe it’s worth considerding libcluster with partisan and a custom partitioning mechanism. this way you could avoid the mesh & decide how to split your nodes into small clusters => you could run flame in each small cluster

This should scale well I believe

cevado

cevado

it’s not a problem of pg but actually a problem of how disterl works… it is explained on partisan docs

Erlang/OTP, specifically distributed erlang (a.k.a. disterl), uses a full-mesh overlay network. This means that in the worst case scenario all nodes are connected-to and communicate-with all other nodes in the system.
Failure detector. These nodes send periodic heartbeat messages to their connected nodes and deem a node “failed” or “unreachable” when it misses a certain number of heartbeat messages i.e. the net_tick_time setting in disterl.

but is worth reading the full section in the doc:

nulltree

nulltree

Hijacking with a noob question here: partisan solves a different problem than pg’s process group scopes, correct?

I assume partisan avoids the full mesh at the network level and process group scopes create an overlay network within the full mesh used for group membership propagation?

Where Next?

Popular in Discussions Top

marcandre
Compilation time for our project degraded from ~26 seconds to ~32 seconds (~23% slower) :disappointed_face:. Did anyone else compare com...
New
rump13
Hi everyone, I’ve been following Elixir since around 2016 and tinkering with it on and off, but I haven’t had the opportunity to use it ...
New
dimitarvp
Hello, I am looking to more closely understand the advantages of the Repo.transact pattern and the quoted disadvantages of Ecto.Multi. ...
New
tristan
First announced on the Erlang Forum, BEAMup is a tool for installing a managing the active instance of BEAM languages. It has support for...
New
arcanemachine
Just wondering what the community currently thinks, prefers, and/or recommends for working with UI components. (e.g. daisyUI, MishkaChele...
New
bartblast
Hologram provides a way to write your entire web application in Elixir, with automatic transpilation to JavaScript for the frontend. It h...
New
New
travisf
In upgrading from Ecto 2 to Ecto 3 I’m dealing with a failing test. If I use ExMachina build(:address) I’ll get an error trying to put_e...
New
michallepicki
Hello! To save some time when switching projects or development machines, I glued together an asdf plugin that uses Erlang precompiled b...
New
adam
I wonder if anyone in the community has started to use Github’s Codespaces for their team’s development? If so, what is there to learn? ...
New

Other popular topics Top

fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement