Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can use tricks like the global spawn option to make processes globally unique. Doesn't scale infinitely, but for a 2->low double digits HA/load balanced system it should be fine.


Oh wow, so this will work across multiple instances of the BEAM?


If they are clustered using erlang clustering, yes. https://erlang.org/doc/man/global.html

Note that this works by taking a transaction lock on the entire cluster, so it's not recommended if you're making requests frequently. It also doesn't respect netsplits, unless you instruct in code to fail with a deficient cluster membership.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: