Elixir distributed processing - IoT

Hi,

At startup where I work, we use Elixir in production for over a year. We are really happy with our decision back then. But now we are facing diferent kind of challenges.

To explain a little bit. Our product is Connected Car IoT platform. Long story shortly… focus of our current problem is how to approach distribution / load/scale of processing. To understand this keep in mind, that we use Processes in a way that process is created when you start your trip, and more or less terminated after you start the car. Of course, then there are other phases, etc. Currently the node responsible for this was ok. But now there is a chance that we might need to scale our solution by factor 500x.

The main issue is how to solve the issue to process each car on only 1 node. So for instance. When you start the trip there is an uniquely named process started. And during that trip… all data for that unique ID should be delivered to that process. And with all the cases… draining the node, restarting the node, terminating the node… preferably moving that processing to another node. But scaling that much …

The ecosystem around how to approach scale-out in Erlang/Elixir is quite vibrant. More established approaches, then more recent problems… it is quite hard to say what is here to stay, what is good enough with enough dev power behind (those projects). I can read about Riak core a lot, but on the same time… that project had a lot of “pause” in between if not mistaken. Now you have Swarn, LibCluster, Partisan, native distribution, … all the way towards AWS scaling groups. So try to understand my “frustrations” :slight_smile: Should we go in the direction of keeping “a node” as a single processing unit (a lot of issues with that) or should we approach Elixir/Erlang ecosystem for that. And if this… which one? What we don’t want is to “complicate” too much this … since we might create more advanced/hard problems … that we might not be able to solve them… and Google might not have that many answers.

So … currently, we use a server like AWS EC2 - c4.2xlarge which is like 8 CPU, 15Gb RAM… and let say… numbers for metrics are now 5000. And we would like to go to a 1 MIO for instance (in reality I guess less).
And of course there is a lot of infrastructure around this… (AWS services, Kafka, Elasticsearch, ScyllaDB… etc)

What would you suggest? :slight_smile: I would really appreciate your feedback.

Kind regards,
Tomaz