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

Ironically, the root cause that made me think of that example was AWS.

The example was where each SQS call (there could be as many as five) was taking between 50ms-200ms, and logging took another 75ms. The rest of the request processing time was approx 50ms.

There's a bunch of other architecture options we could have looked at, but due to the share-nothing nature of PHP, they weren't an option.




... you do know that you can send a response to the client, close the connection and do something else before the process "finishes" right?


I do. However, the process would have stuck around until it finished. It wouldn't have changed our overall RPS at all.

Arguably the same problem would exist in other languages, but at least there we would have had the option of using threads, and we could have executed multiple calls to SQS in parallel. Probably not something I'd want to do all the time, but it would be nice to have had that option in this case.


If it’s a http api, there’s always curl_multi to do multiple concurrent requests.




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: