Do you have a caching service in front maybe?
Do you have a caching service in front maybe?
Yep. Cloudflare is out front, so the actual load on the rasp-pi is mitigated by their content-delivery network.
Then, too, my website is almost entirely simple html with compressed images, so there's not a lot of bytes to shovel.
Here in Berkeley/Oakland, Sonic.net has strung quality fiber-optic, so there's 1Gbit to my house. That lets me keep up with things. However, they only give a dynamic ip address;, so my pi must keep track of its address and tell Cloudflare whenever it changes.
Works surprisingly well - from /top/ I see about several dozen simultaneous users (thank you!), and the cpu temp is about 2 degrees above its normal of 50C
The raspberry pi itself is in the crawlspace under my home, fed through a Ubiquity edge router. Much fun, playing with Unix (oops, I mean Linux) -- sends me back to days of yore when everything happened from your command lines.
1. I met you in Kepler's when Silicon Snake Oil came out and we talked about something and you wrote in the inside "I hear you, John". I don't know what we discussed!
2. I am now Cloudflare's CTO and if you want to avoid the dynamic IP address problem you can use Cloudflare Tunnel to connect to us (rather than us to you). https://www.cloudflare.com/products/tunnel/
And that Kepler's talk? Happy memories, indeed. They "paid" me for my talk by saying that I could have a copy of any book in the store. I chose the Times World Atlas (a way-big book of maps). The manager's face suddenly dropped -- and then I told 'em that I'd pay full list price if all of their employees sound sign the book. Result: I now have a terrific atlas of maps, with a dozen signatures of book people. (two of them visited me last year and I showed them their signatures from decades ago -- very sweet!)
Meanwhile, I gotta send out some of the tsunami of Klein bottle orders. But Cloudflare tunnel? Here I come!
My needs are very similar to Cliff's. I have (or going to have) a home server on a residential ISP which can't accept incomming connections. I need a public-facing server that will return from the cache if I'm ever on the HN front page or my home server is down, TLS handling, and routing to my home server's port 80 when needed.
I mostly serve personal websites but I have aspirations of building a small business. Is there anything in Cloudflare's range that would work for my kind of needs?
Hoping you follow-up on nine-day-old threads, Bill.
2. We literally announced free tunnels for all customer here: https://blog.cloudflare.com/tunnel-for-everyone/
The blogs that go down here typically back every request by MySQL (ahem, WordPress) which is totally unnecessary and often actively harmful since MySQL has very low default total connections allowed.
The point being: don't serve requests backed by a database unless the results are likely to change very dynamically!
WordPress is not my favorite thing and some of the available plug-ins do terrible things with MySQL, but the problem is not too low default connections; it's too many PHP workers. WordPress is generally focused enough that most of the wall time is spent in waiting for the database, so you want to optimize for throughput; one or two workers per cpu thread is plenty for that. More concurrency than execution available reduces throughput, so it's better to queue requests in your http layer than to process multiple at once.
Large numbers of MySQL connections are more appropriate when the web pages do a mix of things, but more/mostly idle DB wise; in that case, you might still want persistent connections to reduce round trips before a query, but are less likely to have a query backlog large enough where task switching overhead becomes significant.
The only difference between this and adding a cache is that the cache is another piece of software in your production stack.
Vanilla SSGs are so simple I ended up writing a basic one out of a markdown and jinja parser in Python every time (for example: https://github.com/eatonphil/notes.eatonphil.com/blob/master...).
If I were not lazy I might learn one of the major ones like Hugo.
It doesn't matter what SSG you pick, they all produce the exact same kind of thing.
But the point was to make a comparison to a Raspberry Pi and emphasize that you do not special compute to withstand thousands of page views. Even S3 and GH Pages are overkill in terms of the compute behind both of them vs. what you need minimally.