RooSoft

RooSoft

Microservices intercommunication using a cluster instead of gRPC or REST

Let’s assume we have a set of microservices running in containers, communicating in gRPC or REST.

Am I right to think that, as long as they’re all coded in Elixir, making a cluster out of these services could potentially be simpler and more efficient than the protocols they’re using at the moment?

Most Liked

hauleth

hauleth

It will be hard to tell if Distributed Erlang will be more efficient, as right now it requires persistent connections between each pair of nodes (it can change if someone ever implement Sistributed Erlang over QUIC), so in large cluster there can be a lot connections.

Another misconception in your post is that not all of the nodes need to be written in Elixir, not even Erlang, not even any other BEAM language. In theory nothing prevents you from building Distributed Erlang cluster using any set of languages you want via C Nodes or manually implementing Distribution Protocol. There are some existing projects that does that. So in the end - you can have whole cluster that uses Distributed Erlang, and not single node that runs BEAM in it.

ityonemo

ityonemo

Potentially, yes. Out of the box, no. At work we have a system where someone tried to be clever and made a heterogeneous service mesh using erlangs built in node discovery methods. I dont love it.

In particular, it’s rather hard to trace data flow across the node boundary (this could probably be proved if we were better at Telemetry), and there are some distributed systems failure modes that you have to think hard about (probably we should have made things genserver calls instead of rpcs). Finally, there isn’t really a good “opinionated” way of testing.

If these issues were solved, it would probably be much better.

So I would generally only recommend distributed erlang used as a failover and reliability strategy with symmetric nodes instead of a service discovery strategy.

andrzej-mag

andrzej-mag

You can take a look at Meshx - service mesh architecture.
Inter-node communication with custom binary RPC protocol as close to bare metal as possible. Transport over service mesh data plane with mTLS, LB, HA, ACL, etc.

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
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

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
New
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
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New

We're in Beta

About us Mission Statement