News for hackers. Stuff that matters.
Re:Managing two million web servers by ghayes on Sunday March 13, 2016 @09:12PM (#11280379)
Well, not if you distribute your erlang processes across several physical nodes.
Re:Managing two million web servers by jbardnz on Sunday March 13, 2016 @09:39PM (#11280510)
You mean just like you can with Apache or Nginx?
Re:Managing two million web servers by statictype on Sunday March 13, 2016 @11:23PM (#11280854)
Yes - it's exactly like that. The Erlang VM itself has to be rock solid just like you expect Apache and Nginx to be rock solid.

Fortunately this more or less seems to be the case.

Re:Managing two million web servers by phamilton on Sunday March 13, 2016 @11:53PM (#11280957)
I would say a better comparison is the Linux kernel. If the kernel crashes, everything on that box goes.
Re:Managing two million web servers by felixgallo on Sunday March 13, 2016 @10:15PM (#11280642)
No. Not at all like those.
Re:Managing two million web servers by niij on Sunday March 13, 2016 @11:03PM (#11280807)
Can you please expand on why?
Re:Managing two million web servers by vertex-four on Monday March 14, 2016 @06:24AM (#11281963)
The processes can communicate with processes on other servers in exactly the same way that they can communicate with processes on the same server.

If you have one traditional application server and want to do some form of cross-user interaction - let's say chat - you can do that trivially, put it in a queue for that user in a global map. Now when you outgrow that server, you need to rewrite all your code to understand the concept of users being on other servers or use an external message queueing system.

In Erlang, all of this is built in by default - if you write code for the OTP framework (the standard library for dealing with messaging, process supervision, etc), all you need to do is connect the two servers together and point them at the same shared user->process mapping process (which you have to build whether you're dealing with one server or 20, as there's no global data otherwise).

Of course, if you have absolutely no direct interaction between users, it's trivial to scale anything - fire up a new server and direct some portion of your traffic at it. Erlang's trick is to make it that easy even when you do have direct interaction between users. And of course that works for even backend workloads - if you have a backend server that your frontend servers talk to and need to scale it, if you've coded in Erlang and put as much logic as possible in per-connection processes, you're probably a significant chunk of the way there.

Re:Managing two million web servers by ww520 on Monday March 14, 2016 @03:59PM (#11285134)
What does any of these have to do with the equivalence between Apache/Ngix and Erlang when running multiple servers of them to avoid crashing all?
Re:Managing two million web servers by vertex-four on Monday March 14, 2016 @04:20PM (#11285287)
You can't use traditional servers to scale in lots of cases without a lot of additional development work. You can use Erlang servers to do so. Therefore, they're not the same - Erlang covers a broader range of use cases.
Re:Managing two million web servers by reinhardt1053 on Monday March 14, 2016 @06:34AM (#11282010)
A constructive comment would be appreciated.
Re:Managing two million web servers by ww520 on Sunday March 13, 2016 @10:45PM (#11280757)
The Erlang error in code could be replicated to every single physical node and all of them would crash.
Re:Managing two million web servers by rusanu on Monday March 14, 2016 @01:47AM (#11281277)
Presumably one would catch such a blatant error early in testing. The problem is the odd case, the code that only crashes in a rare state, never seen in test. When the odd state does occur the effect is mild, as only one actor dies as opposed to the entire OS process.
Re:Managing two million web servers by ww520 on Monday March 14, 2016 @03:55PM (#11285105)
I was responding to the assertion that distributing code to multiple "processes" would avoid crashing all of them, which is simply not true. Even the rare state you mentioned would crash all the processes. The rare state would be an input that testing failed to catch. The code in any of the processes encountering the rare input could crash.
Re:Managing two million web servers by felixgallo on Sunday March 13, 2016 @10:50PM (#11280774)
That is not what happens.