Erlang redundancy in different equipment

Hello Everything is fine? Someone can help me.

I would like to know if it is possible to put two different computers running the same system in erlang, one being a replica to the other (master). The master transmits all changes to the replica. The reason would be in case the Master fails and the replica takes over from the point of failure.

If not, how can I do this? which non-container tool (DOCK or KUBERNETE)?

thanks

I guess it’s not impossible but it sounds hard thing to do. You can’t just get everything running in the new system with same state. I mean in Elixir app you can have different processes being started and removed and you would have to get everything into same exact state. I would expect lot of work from you to get it work like that.

If it’s possible depending on what you are building to build your service stateless then it’s a different story Then everything would be stored in external database. New instance could just load everything from the database and start running.

As a side note lot of people view term slave offensive nowadays even if it’s related to tech. I would use term replica in this context instead.

thanks wanton 7, I will correct the term for replica.

I think I’m really going to use state control and that will be a problem, my idea would be to make a replica ready to assume a point of failure, but I forgot about those details, since it would work for the database.

Anyway thank you very much for your feedback.

Changes to what? An erlang node isn’t a database that stores data, it’s a VM running a programming language. If you have two nodes doing exactly the same thing then this will be bad, because if you do something like send someone an email, now you’re going to send them two emails.

It is definitely possible (and even a good idea) to run multiple copies of your software on multiple nodes. Traditionally if it’s a web service you put them behind a load balancer so that traffic can go to all healthy nodes. If it isn’t a web server you actually can setup standby nodes via erlang application config. Do note that the standby is basically sitting idle though until it’s called up for use, vs having all data sent to it.

This is basic out of the box for erlang/elixir. Store your state in mnesia, and then figure out your master/failover strategy. A simple way to go is to use highlander

Hello benwilson512 Everything is fine?

Do note that the standby is basically sitting idle though until it’s called up for use, vs having all data sent to it

In fact I want to do just that.
I’m going to look at the documentation for doing this kind of implementation.

My server is not Http, but the application running on it doesn’t allow me to spend a long time to change it in case of failure.

I’m aware that when taking over (stand by server), it won’t have the states that the main server had, but that was accepted by the folks in the spec.

The data of transactions that occurred on the active server, are recorded in a database that is on a third server (I use a database that replicates in 2 more servers automatically). So when the standby server assumes the transaction data will be up to date, as the data is from a service billing and credit system, I cannot lose the credits and debits that occurred, but the operation may have a small latency time for the exchange of servers.

Thanks for your attention

Thanks I will look at the highlander.