Hacker News new | past | comments | ask | show | jobs | submit login

No offense, but rewriting httpd in rust won't make it any better. There's no excuse for thread-per-connection in 2020.



Good thing Apache has mpm_event https://httpd.apache.org/docs/2.4/mod/event.html


in a hilarious turn of events (to me at least), I was one of the primary developers of the event mpm.


Alright, so please correct me if I'm wrong then.

I cannot perform a non-blocking operation (querying redis for example) from within my module's handler function because as soon as my handler returns httpd sends a response. i.e. there's no 'NOT_DONE_YET' return code?

And while I'm anonymously ranting on the internet...

- being able to control response headers completely would be nice. In our case, the Date and Server headers cost money to send and our clients don't care about them. It's not for security reasons, it's about traffic egress costs on the cloud

- having a way to hook a worker thread's init would be useful

- there must be an easier way to get a request body other than the bucket brigade stuff?


1) You return SUSPENDED instead of OK from your handler. See also http://svn.apache.org/viewvc?view=revision&revision=1593860

2) You can control all response filters at the byte level with an Output Filter.

3) Hooks already exist for this: https://ci.apache.org/projects/httpd/trunk/doxygen/group__ho...

4) No. Bucket Brigades is the API for this. It's an efficient linked-list of future-data. It's a good API IMO, just needs some understanding, and because its in C, its full of macros (there are more alternatives to making it cleaner if we weren't using C)


1) potential gamechanger. Thanks for pointing it out

2) yes, but there's a config directive for the Server header too that could just allow people to turn it off

3) for child_init, but nothing obvious that maps to a worker_thread_init

Are there plans for httpd to avail of io_uring if the kernel provides it?

I will admit, I've struggled with configuring httpd for years. A single threaded redis server can handle more connections than a full httpd install.


LOL


That's not at all the issue they said that Rust would help with.


Yes but porting httpd to another language would just be putting lipstick on a pig!




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

Search: