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

It took me a while to realise that you were responding to the article, not a comment here.

You're right in correcting the article, but I'd like to add that for probably around a decade, Erlang had 'sender punishment', which is what 'IsTom' who replied to you is probably talking about.

Ulf Wiger referred to sender_punishment as "a form of backpressure" (Erlang-questions mailing list, January 2011). 'sender punishment' was removed around 2018, in ad72a944c/OTP14667. I haven't read the whole discussion carefully, but it seems to be roughly "it wasn't clear that sender punishment solved more problems than it caused, and now that most machines are multi-core, that balance is tipped even more in favour of not having 'sender punishment'".



Sender punishment on the same node may be dead, but AFAIK, if the dist connection to a remote node is beyond the backlog threshold, sends will block, which offers some backpressure.

Is that sufficient and/or desirable backpressure, and does it provide everything your app needs? Maybe close enough for some applications?

You can also do some brute force backpressure stuff now; you can set a max heap size of a process and if it uses an on-heap message queue, it should be killed if the queue gets too large. Not very graceful, but create some back pressure.

I'm a fan of letting back pressure accrue by having clients timeout, and having servers drop requests that arrive too late to be serviced within the timeout, but you've got to couple that with effective monitoring and operations. Sometimes you do have to switch to a quick response to tell the client to try again later or other approaches.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: