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

Usually one would use Redis for this problem, and you have a Redis-like system (but based on pattern matching) native to OTP, ets.

If you need a global, cluster wide counter, spawn a process with name {:global, :whatever} and let it be the source of truth for this value.

Depending on the problem, there are multiple approaches you can take. And a single Postgres instance is able to deal with massive concurrency, there might not be any need for premature optimization when SQL transaction could do.




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: