Live data from Hacker News

Show HN: Hosting my website using my C web server

github.com

21–30 of 160 posts

Re: Show HN: Hosting my website using my C web server

#21

Finally a website that doesn't crash when it shows up on the front page

Uhh… doesn’t the link go to GitHub? I’m a little confused by this comment. I mean the project is neat and cool. But I imagine most folks go to GitHub and don’t go to the link showing the webpage. Am I missing something?

Re: Show HN: Hosting my website using my C web server

#23
> Show HN: Hosting my website using my own C web server

"But if you actually do this, WAT" – https://www.destroyallsoftware.com/talks/wat

As with much of HN, this is fun, a good thing to learn while making and reading about... but it likely needs the caveat that doing this is production isn't a good idea (although in this case the author does not appear to encourage production usage).

Re: Show HN: Hosting my website using my C web server

#25
You may be interested in this https://news.ycombinator.com/item?id=27431910

> As of 2024, the althttpd instance for sqlite.org answers more than 500,000 HTTP requests per day (about 5 or 6 per second) delivering about 200GB of content per day (about 18 megabits/second) on a $40/month Linode. The load average on this machine normally stays around 0.5. About 19% of the HTTP requests are CGI to various Fossil source-code repositories.

Re: Show HN: Hosting my website using my C web server

#26

Finally a website that doesn't crash when it shows up on the front page

Any site with a CDN in front of it can do that.

Don’t get me wrong this is an awesome project but if you really care about this kind of thing in a production scenario and you’re serving mostly static content… just use a CDN. It’ll pretty much always outperform just about anything you write. It’s just boring.

Re: Show HN: Hosting my website using my C web server

#27

> Show HN: Hosting my website using my own C web server "But if you actually do this, WAT" – https://www.destroyallsoftware.com/talks/wat As with much of HN, this is fun, a good thing to learn while making and reading about... but it likely needs the caveat that doing this is production isn't a good idea (although in this case the author does not appear to encourage production usage).

It’s a great way to get hacked

Re: Show HN: Hosting my website using my C web server

#28

Finally a website that doesn't crash when it shows up on the front page

Uhh… doesn’t the link go to GitHub? I’m a little confused by this comment. I mean the project is neat and cool. But I imagine most folks go to GitHub and don’t go to the link showing the webpage. Am I missing something?

Link to the actual site is at the top of the GitHub page.

Re: Show HN: Hosting my website using my C web server

#29
Awesome! I used to think (well, I still do) that getting a barebones service up and running using the system APIs at the lowest level like this is so satisfying. It's sort of magical, really. And to see it serve real traffic! I'm kind of surprised that the vanilla poll() can put up numbers like you were seeing, but I guess it's been a while since I've had to do anything event related/benchmark at that level.

I love the connection-specific functions and related structs and arrays for your connection bookkeeping, as well as the poll fd arrays. It's very reminiscent of how it's done in lots of other open source packages known for high throughput numbers, like nginx, redis, memcached.

Great work!

Re: Show HN: Hosting my website using my C web server

#30

> Show HN: Hosting my website using my own C web server "But if you actually do this, WAT" – https://www.destroyallsoftware.com/talks/wat As with much of HN, this is fun, a good thing to learn while making and reading about... but it likely needs the caveat that doing this is production isn't a good idea (although in this case the author does not appear to encourage production usage).

I'd assume most people would know that? But if they still put random code that someone wrote just for fun into a (serious) production system, then WAT.

Edit: And sure, if the author is lucky, then maybe a handful of people will gather around the code and try to make it "production ready". But since the README doesn't say anything about the topic at all, just let people have fun and learn things along the way?

Post reply on HN