by nivertech · 3y ago · 0 comments
Serious question: why though? I can't think of a backend system where a single regression could bring the whole thing down. If something blows it up, it rarely takes the whole application down. What's this scenario exactly? Maybe I'm only thinking of certain types of applications, but a single failure somewhere needn't bring the whole thing down.
A crash in a stateless distributed tier (e.g. web servers) will not take the whole system down.
But a crash while processing any request in a stateful non-distributed multithreaded system, can bring it down. It's much harder to make stateful systems resilient and fault tolerant. Usually it's solved by moving the state somewhere else (e.g. databases, message queues, or Kafka-style AOLs).
Exception: monolithic stateful systems using BEAM/OTP/Erlang/Elixir. Here the blast radius is per Erlang process, so in the worst case only a single request/user/session should be affected. There are some classes of errors (e.g. out-of-memory, overloaded process message queues, or crash in native code library) which can bring down an entire Erlang node. This can be mitigated by running a cluster of several Erlang nodes (which is supported out-of-the box by BEAM VM and OTP).
150 nodes is a lot. I love the beam.
I personally only run max 10 nodes Erlang cluster (on physical servers) in production, and ~ 20 on AWS for dev/testing workloads.
But I think it's better to have a federation of smaller clusters, or separate cluster per datacenter/AZ.
Erlang distribution isn't a silver bullet, though. But for 80% of cases it's enough.
---
[1] Scaling Erlang cluster to 10,000 nodes
https://codesync.global/media/maxim-fedorov-scaling-erlang-c...
BTW: I expirienced the entier us-east region going down just in time when I was demoing my product to a VC. Turns out it was a bug in an AWS Management Console for that region.