14 ms·
Website hosted on ESP32
- kaptainscarlet 3y agoI got a gateway error. Perhaps it "works on your machine" only. :-D
- nativeit 3y agoHeadline should read Website was hosted on ESP32 ($3 chip)
- codetrotter 3y agoLoaded fine for me now :D
- simlevesque 3y agoWebsite doesn't load.
- harry247 3y agoit was too much traffic to handle for this little poor chip
- ulrischa 3y agoIf you look for something similar for the raspberry pico w try phew! from pimoroni: https://github.com/pimoroni/phew https://github.com/pimoroni/phew Also I think microdot will be running on the pico too.
- 00deadbeef 3y agoIt’s down now. If the typical hackernews traffic could all be queued up, how long would it take the ESP32 to finish processing it all?
- notRobot 3y agoDoes anyone have recent information on how much traffic being on the HN frontpage gets you? Would be helpful to know.
- mobilio 3y ago15-20k but can be easy solved with CloudFlare full page cache rule
- snvzz 3y agoLikely possible to handle HN load just fine... if the page was static. edit: page loaded. It's apparently Microdot, a micro web framework running on micropython.
- waveBidder 3y agoit's currently dead
- LoganDark 3y agoThat explains why it instantly fell over
- yjftsjthsd-h 3y agoWell yeah, anything is easy if your server isn't doing the work.
- mikercampbell 3y ago“This website is run on an ESP32 chip that only cost $3 as for my proxy, I’m using distributed cluster of rack servers and relays”
- chefandy 3y agoHmmm... given the nature of the site, it probably would have been better to post an archive link: https://web.archive.org/web/20231105185258/https://esp.khalsalabs.com/ https://web.archive.org/web/20231105185258/https://esp.khals...
- amelius 3y agoPerhaps it would work better on a cluster of these.
- spudlyo 3y agoRight, like a Beowulf cluster!?
- gotbeans 3y agoHn's Hug of death
- mikercampbell 3y agoCame to do my part
- robbywashere_ 3y agoHow the heck did you get a kubernetes cluster to run on a esp32?!
- alexchamberlain 3y agoWas that a joke? There doesn't seem to be any implication this is running k8s?
- kaptainscarlet 3y agoIt's running k8s with a load balancer for all the HN traffic
- andrewstuart2 3y agoSorry, where's the assumption it's using kubernetes coming from? All I see in the response is nginx which doesn't imply anything k8s. The blog linked from the page doesn't mention k8s either (nor nginx). That said, you can run an ingress for a service that's just an externalname reference with the right annotations depending on your ingress controller and I'm pretty sure it'd just work.
- forkerenok 3y agoI think both commenters said those things in jest referring to the oft occurring on HN criticism that everything has to run on k8s nowadays, even a simple website.
- LoganDark 3y agothe joke is that every website needs k8s even though none of them do
- flycatcha 3y agoThe tutorial talks about how to do a local webserver where you manually navigate to the IP address. How is this being served over the internet?
- panki27 3y agoDNS and port forwarding.
- grishka 3y agoAnd probably buying a static IP from your ISP.
- byteknight 3y agoJust DDNS
- grishka 3y agoNot all home ISPs give you an entire IPv4 address. Some have fewer IPs than subscribers and thus use a NAT. Sometimes a very restrictive one.
- roywashere 3y agoIn Europe, most ISPs use carrier graden NAT nowadays
- panki27 3y agoYou can get around the issues of CG-NAT by setting up a reverse tunnel to an external server you control.
- LoganDark 3y agonginx reverse proxy
- 3y ago
- Aissen 3y agoLooks like there's a (non-caching?) nginx reverse proxy in front to do the TLS. I remember trying to do TLS on an ESP8266 and there was a hardcoded limit on the SSL buffer size, limiting the maximum cert chain that could be served. I wonder if there is a similar reason here.
- _ache_ 3y agoHere is the tutorial: https://khalsalabs.com/hosting-a-website-on-esp32-webserver-with-microdot-step-by-step-guide/ https://khalsalabs.com/hosting-a-website-on-esp32-webserver-.... There is a nginx proxy. Nothing fancy here but kudo for the tutorial.
- harry247 3y agothanks !! yes it behind nginx
- 0172 3y agoIt is feasible to run a small static HTML/CSS/JS page from this microcontroller with a Nginx, Varnish, etc cache frontend.
- rany_ 3y agoHow are they doing SSL certificate management on an ESP32? Their article at https://khalsalabs.com/hosting-a-website-on-esp32-webserver-with-microdot-step-by-step-guide/ https://khalsalabs.com/hosting-a-website-on-esp32-webserver-... makes no mention of how that would work, only really basic code for a static cleartext HTTP server. Is it even capable of such a thing? Edit: I got a default nginx/1.18.0 (Ubuntu) gateway timeout message after a few minutes trying to load this page, this is reverse proxied.
- schappim 3y agoThe error message "504 Gateway Timeout nginx/1.18.0 (Ubuntu)" suggests that Nginx, running on Ubuntu, is acting as a proxy server and is timing out while trying to connect to the backend server. The SSL cert is on the proxy server.
- declan_roberts 3y agoSo the answer is… they’re not!
- jcalvinowens 3y agoAn HTTPS server with esp-idf is absolutely trivial: https://github.com/espressif/esp-idf/blob/b4268c874a4cf8fcf7c0c4153cffb76ad2ddda4e/examples/protocols/https_server/simple/main/main.c https://github.com/espressif/esp-idf/blob/b4268c874a4cf8fcf7... The software support is incredible IMHO, it's a huge reason to use these chips. I made some toy temperature sensors with an esp32 last year, they make it so easy: https://github.com/jcalvinowens/tempsensor https://github.com/jcalvinowens/tempsensor
- constantly 3y agoVery curious about the scaling process. I've been building something on a breadboard with an esp32 and I'm pretty happy with it. Now I want it to be a lot smaller, and in one piece rather than with a bunch of wires and components on a breadboard. How do you make the step from breadboard dev to something manufacturable?
- saralily 3y agoSure seems like it!
- shrubble 3y agoEven on the much lower end ESP8266 it was usual to use a web browser to let the user configure the application etc. It was fast enough, for one user at a time...
- rabbits_2002 3y agowell not sure what i expected but it seems to be down lol
- system2 3y agoWebsite I tried to host on ESP32*
- harry247 3y agoLol! this is true after posting on HN
- raxi 3y ago~20 years ago there have been websites running on 8-bit chips consuming 400 bytes of ROM and 32 bytes of RAM (e.g. http://web.archive.org/web/20050601082859/http://www-ccs.cs.umass.edu/~shri/iPic.html http://web.archive.org/web/20050601082859/http://www-ccs.cs...., an open-source clone: http://web.archive.org/web/20010109144200/http://www.chat.ru/~zhengxi/wwwpic/pic2.htm http://web.archive.org/web/20010109144200/http://www.chat.ru...) A 32-bit CPU is very rich
- HelixEndeavor 3y agoWell, given that the modern web has a lot more requirements for security to even permit most browsers to view a site, it makes sense that the base hardware needs have increased noticeably.
- raxi 3y agoExactly those PIC18 devices, still in production and on sale, w/o any changes during the years: http://utronix.se/ http://utronix.se/ Of course, no https, but.. it is not a platform limitation, just an undemanded feature: how would you get a https cert for 192.168.0.1 or a similar intranet address where those device suppose to work? They are just not for cloud datacenters
- Filligree 3y agoYou can make an HTTPs certificate with that in the SAN section, and it should work fine. You can't get one from a publicly trusted provider, of course, but that's fine; you don't own the IP. In other words, make your own certificate authority for your own machines. It isn't that hard.
- raxi 3y agoThe problems here is not that hardness, and not even yearly certificate updates, or bothering with new certs on every IP address change, but (as the commentator above rightly pointed out)... 1. Planned obsolescence built into HTTPS: no HTTPS-aware server device from year 1999 would work with 2023 browsers. Just because "too old crypto". Plain HTTP works. Being on a buy side I am against HTTPS in such devices, but I understand the sell side's position.
- harry247 3y agoOMG!! I didn't expect that I am getting that much traffic from HN. I put this besides nginx but still its too much traffic to process for Esp32 S2 chip. Lol
- Poudlardo 3y ago...but not for long
- c22 3y agoI put a website into 95% of my esp32 projects, mostly to make configuration easier.
- harry247 3y agoI did some load tests before postings, simulate 100 users at a time. It was serving only 47 of them: https://bashify.io/images/tNg4SB https://bashify.io/images/tNg4SB https://bashify.io/images/7OtLGf https://bashify.io/images/7OtLGf
- m3kw9 3y agoLooks burnt out now
- acbmkt 3y ago[dead]
- imhoguy 3y agoPut that on OpenWRT router (usually more powerful than ESP) and you call it "hosted on edge"
- LoganDark 3y agoHosting a website on ESP32 is one thing, but running Python on it?! Are you insane? No wonder it gets hugged to death if more than 2 people visit it at once.
- YiraldyGuber 3y agoThank god someone said it. That poor ESP32 needs to be rescued from this sadist.
- mikewarot 3y agoI wondered why in the heck a static web site running in a resource limited environment would even attempt to run https. Based on the HN hug of death, it appears the reverse proxy adds HTTPS/TLS/whatever support, and it wasn't able to cope. I wish that the demand for security theater in web browsers wasn't so high that they effectively prohibit plain old text transport.
- bradly 3y agoI would blame ISP's and public WIFI providers before blaming browsers for preventing ISPs and/or anyone else from MitM/malware/injection attacks.
- harry247 3y agoyes, you got it right its due to that odd message web browsers show for non-https websites. This HTTPS/TLS has been added using nginx on different server, also to support some load. The website is still under lot of traffic, however nginx is doing good on its part.
- IshKebab 3y agoIn what way is requiring encryption security theatre?
- anigbrowl 3y agoNot everything needs to be encrypted. If I'm serving static webpages the only thing I might want to log is the which IPs visited at what time of day.
- arthurcolle 3y agoHow can you reliably know that you're not being MITM without HSTS?
- mikewarot 3y agoHow can you know you're not with HSTS? The whole centralized security system is suspicious in terms of failure points.
- nektro 3y agowe didn't stop hosting websites on hardware like this because it's impossible. we stopped because spammers made it impractical.
- declan_roberts 3y agoWebsite hosted on ESP ($3 chip) and served from $15,000 CDN server.
- harry247 3y agonope, no CDN. It has NGINX reverse proxy
- jdjdjdhhd 3y agoI used to host a website on ESP8266 for my personal use... An even weaker and cheaper chip
- SilverBirch 3y agoI personally think it's pretty mean to hear that a website is hosted on an ESP32 and then post it on HN. Guess we're going to test this one to destruction...
- kleton 3y agoSat sri akal
- harry247 3y agoSat Sri Akaal
- amelius 3y agoI want to see a website hosted on a computer built entirely from discrete transistors.
- oytis 3y agoCool, but is it news? MCUs have been capable of running simple webpages for at least 20 years. What's unusual is exposing it to public internet, where it can be quickly hugged to death.