8 ms·
For the hundreds of people reading this article right now - you might be amused to know that you're accessing it from a mac mini on my desk: https://www.contra
by philip1209 2y ago
For the hundreds of people reading this article right now - you might be amused to know that you're accessing it from a mac mini on my desk:
https://www.contraption.co/a-mini-data-center/ https://www.contraption.co/a-mini-data-center/
(The CPU load from this is pretty negligible).
- adamtaylor_13 2y agoI actually read that blog post too last week (or the week before?) and I’m genuinely considering this. Render is crazy expensive for blog sites and hobby apps.
- philip1209 2y agoHere's the core scripts I use for the mac mini. They're a bit raw, but hopefully useful: https://gist.github.com/philipithomas/ed57890dc2f928658d2c90ba128f1d8e https://gist.github.com/philipithomas/ed57890dc2f928658d2c90...
- shadowangel 2y agoI was using an old Samsung s8, with a USBc ethernet adaptor it was more then capable serving allot of requests.
- mattgreenrocks 2y agoLove all the projects you have going. Do you use a template for the landing pages? Or DIY? They look great!
- philip1209 2y agoThanks! Postcard was made with some help of TailwindUI.com. Booklet's homepage is based on a Webflow template: https://webflow.com/templates/html/gather-saas-website-template https://webflow.com/templates/html/gather-saas-website-templ...
- raitom 2y agoWhat kind of Mac mini do you use (cpu and ram)? I’m really interested in making the same thing but I’m not sure if the base M4 mini is enough with just 16gb of ram.
- jon-wood 2y agoDepends what you're doing. If it's literally just serving up some static web pages though that is hilariously over specified, you're going to be constrained by your internet connection long before that Mac Mini starts breaking a sweat.
- philip1209 2y agoI have the m4 pro with 24gb of ram. I wish I had increased the ram to 64gb - I'm at 50% utilization already. The CPU is more powerful than I need. I didn't pass 8% utilization in the last 24 hours as HN slammed the box.
- firefoxd 2y agoI've tried to do so with a $9 pocket pc, but ended up frying it by accidently short-circuiting it. I wrote a visualizer for the traffic that I think people will appreciate [1]. I will post it next month once I add it on github. It was fun to watch an article that went #1 on HN. [1]: https://ibb.co/cXT3VNDR https://ibb.co/cXT3VNDR
- cl0ckt0wer 2y agoDo mac minis have ECC ram?
- k4runa 2y agoNice
- rapind 2y agoPretty cool. Wouldn't work for me as my ISP is horrendously unreliable (Rogers in Canada, I swear they bounce their network nightly), but I might consider colocating a mac mini at a datacenter.
- tempest_ 2y agoPresumably CF is doing most of the work if the page doesnt actually change all that much?
- kevincox 2y agoIt does look like the main article isn't actually cached by Cloudflare. But most of the assets are. So it is definitely helping but not taking the entire load.
- philip1209 2y agoYeah, but there's Plausible Analytics self-hosted on the mac mini that's getting more of the load right now.
- boogieup 2y agoNobody's actually doing work because serving web pages is cheap.
- fmbb 2y agoIs it really cheap through ruby?
- _vaporwave_ 2y agoVery cool! Do you have a contingency in place for things like power outages?
- philip1209 2y agoNot really . . . Cloudflare Always Online, mostly. I had 2m35s of downtime due to power outages this week.
- firecall 2y agoA MacBook Air solves this problem very nicely! Not only does is have a built in UPS, but also comes with a screen, keyboard and trackpad for you need to do admin tasks physically att the console!
- philip1209 2y agoYeah, I had considered this! But, then I'd need a UPS on my modem and wifi, and at that point it seemed overkill.
- firecall 2y agoYes, totally. Although you could use a backup USB cellular modem, plugged directly into the Mac! At some I imagine I'll inherit or acquire a cheap older M1 Macbook Air, which will be perfect! I also have whole home battery backup and solar, so I technically have a UPS for everything! Where I live the power tends to go out from time to time! I monkeyed around with cheap ex-lease Dell Micro PCs with Intel 8th Gen to 11th Gen CPUs. But they not as performant as I'd like, and once you've experienced modern CPUs like Apple's M series, you dont really want to go back!
- trinix912 2y agoI like that you're pointing out application longevity in the linked article. It seems that new SaaS apps appear and disappear daily as cloud hosting isn't cheap (especially for indie hackers). I'd much rather sign up for an app that I knew wouldn't randomly disappear in a couple of months when the cloud bills surpass the profits.
- cultofmetatron 2y agoI took a startup from zero to 100k MRR as of last month over the last 5 years. I can tell you that cloud billing is the least of your concerns if you pay even the cursory attention to writing good queries and adding indexes in the right places. The real issue is the number of developers who never bother to learn how to structure data in a database for their use case. properly done, you can easily support thousands of paying users on a single write server.
- giantrobot 2y agoWhat? No no, to be fast you need the whole database only in RAM! And SQL is hard so just make it a giant KV store. Schemas are also hard so all values are just amorphous JSON blobs. Might as well store images in the database too. Since it's RAM it'll be so fast! /s
- deleted 2y ago[deleted]
- goosejuice 2y agoA bit hand wavy. It obviously depends on the business and what "least of concerns" entails. In most cases businesses justify the cost of managed databases for less risk of downtime. A HA postgres server on crunchy can cost over $500/mo for a measly 4vCPU. I would agree that it's the least of concerns but for a different reason. Spending all your time optimizing for optimal performance (assuming sensible indexing for what you have) by continuously redesigning your DB structure when you don't even know what your company will be doing next year isn't worth the time for a few hundred a month you might save.
- bluGill 2y agoback in my day kid we used to serve far more users from 40mhz CPUs. The only interesting part is that today you can get pipes fast enough to do this in your house, while back then dialup was all we could afford ($1000/month to get into the 1 megabit/second range, ISDN and DSL came soon after and were nice). Of course back then we didn't use dynamic anything, a static web page worked. Now get off my lawn!
- vidarh 2y agoMy first company website was served of a 120MHz Pentium that also served as the login server where 5 of us ran our X clients (with the X servers on 486's with 16MB RAM)... And it wasn't static: We because peoples connections were mostly so slow, we used a CGI that shelled out to ping to estimate connection speed, and return either a static image (if you were on a dialup) or a fancy animated gif if you were on anything faster. (the ping-test was obviously not reliable - if you were visiting from somewhere with high latency, you'd get the low bandwidth version too, no matter how high your throughput was - but that was rare enough; it worked surprisingly well)
- JohnBooty 2y agoI love that so much. You just don't see wacky solutions like this any more. I guess it's a good thing, but this career has gotten a hell of a lot less fun and interesting.
- helpfulContrib 2y agoI used to host 3,000 active daily users from a 33mhz 486 with a 56k modem. Thousands and thousands of lines of quality conversation, interaction, humanity. To be honest, I kind of miss those days. I love to think that the web of the future is just going to be everyones' mac Mini or whatever. Big Data™ has always irked me, frankly.
- larodi 2y agoEveryone moved too fast into the future, and this is perhaps not that good. The whole ASCII and 90s/cyberpunk nostalgia is being a major cue.
- TomK32 2y agoIt's fun to host at home, I run docker on alpine VMs on two proxmox machines. Yeah, different docker machines for each user or use-case look complicated but it works fine and I can mount nfs or samba mounts as needed. Only thing I have on the cloud is a small hetzner server which I mostly use as a nginx proxy and iptables is great for that minecraft VM. Why did you go for Cloudfare tunnel instead of wireguard?
- nemothekid 2y agoCloudflare Tunnel provides you a publicly routable address for free. With wireguard you would still need a VM somewhere, and if you are hosting your own VM, then whats the point?
- dingi 2y agoBut you are using someone else’s VM. You just don’t pay for it.
- boogieup 2y agoNot making Cloudflare more of a central point of failure for the internet? We hosted web pages before they MITM'd the entire web.
- miyuru 2y agoPublic IPv4 address exhausted and NAT happened. Even having IPv6 is not a proper solution because of laggy ISPs(currently reaching ~50%) and the even the ISPs who deploy, do not deploy it properly. (dynamic prefixes or inbound blocked IPv6) Add to the mix that lot of people does not understand IPv6, internet became more centralized and will keep doing so for the foreseeable future.
- october8140 2y agoI like how they have amazing great free services and people are upset so many people use it.
- 2y ago
- jonwinstanley 2y agoWeirdly, that tower in the photo is also on the front page of HN right now https://vincentwoo.com/3d/sutro_tower/ https://vincentwoo.com/3d/sutro_tower/
- philip1209 2y agoAh - I took that photo on the way to Mount Olympus Park, which is one of my favorite little parks in SF. It has an interesting history: https://en.wikipedia.org/wiki/Mount_Olympus_(San_Francisco) https://en.wikipedia.org/wiki/Mount_Olympus_(San_Francisco)
- jonwinstanley 2y agoNice!
- asdfman123 2y agoWhat is HackerNews but a system to stress test everyone's hobby websites?
- atum47 2y agoEvery time I share a project I provide two links, one for my vps and another one for GitHub pages. Usually my projects run on the client, so I have never experienced the hug of death myself.
- ash-ali 2y agoI absolutely love this comment <3
- mey 2y agoBefore this Digg, before that Slashdot. What else am I missing?
- besus 2y agoFark
- entropie 2y agodel.icio.us anyone?
- mannycalavera42 2y agoyup!!! I've replaced it with https://pinboard.in/popular/ https://pinboard.in/popular/ now but it's not the same
- no_wizard 2y agoThere was a time where Reddit was good for discovery as well
- pjmlp 2y agoBefore we were all on USENET, some lucky ones were on Compuserve and AOL, and BBSs were limited by phone lines, not really anything to test loads.
- peterhunt 2y agoNow do it without Cloudflare :)
- philip1209 2y agoPerhaps some day. My shorter-term goal is to switch my home internet to Starlink, so that all requests bounce off a satellite before landing at my desk.
- nofunsir 2y agoExcept Starlink uses CGNAT, which means you need some external SSHD port forwarding at least.
- nemothekid 2y agoHe could keep using Cloudflare Tunnel, but then he's still using Cloudflare
- Eikon 2y agoTrivial, even for a high traffic website to be served from a fiber connection.
- philip1209 2y agoIf only my part of SF had fiber service. #1 city for tech, but I still have to rely on Comcast.
- Eikon 2y agoSounds weird to read that from Western Europe where even the most rural places have fiber! I understand that the USA is big, but no fiber in SF?
- deaddodo 2y agoIn the US, it’s not about money or demand. The more entrenched cities (especially in California, for some historic reasons/legislation) tend to have a much more difficult time getting fiber installed. It all comes down to bureaucracy and NIMBYism.
- bmelton 2y agoI've been thinking about that article for the past week so much that I've been looking at $250 Ryzen 7 5700U 16/512/2.5G Ace Magician NUCs to move some of my properties to. They're known to be shipping spyware on their Windows machines, but my thought was that I'd get 3 of them, clear them out with Debian, and set them up as a k8s cluster and have enough horsepower to handle postgres at scale.
- philip1209 2y agoGlad it resonated with you! If you're considering k8s, take a look at Kamal (also from DHH): https://kamal-deploy.org/ https://kamal-deploy.org/ I think it makes more sense for small clusters.
- bmelton 2y agoIt probably does! Kamal/MRSK has been on the roadmap for awhile. I have deliberately endeavored to keep the existing k8s setup as minimal as possible, and it's still grown to almost unruly. That said, it works well enough across the (surprisingly power efficient) Dell C1100s in the basement, so it'd take a migration to justify, which is of course the last thing you can justify this with.
- antonvs 2y agoWhich k8s distribution are you using? I’ve been using k3s on everything from individual home machines or cloud VMs, to small on-premise customer clusters for customers who don’t already have their own k8s clusters. I don’t find it approaching unruliness, quite the opposite really.
- bmelton 2y agoVanilla, CNCF. K3S is tempting.
- ww520 2y agoGet NUC, or one of those refurbished Dell or HP mini PCs. They have plenty of CPU power, consume very little idle power, and friendly to Linux.
- your_challenger 2y agoIs cloudflare tunnels really this free to support thousands of internet requests? I run a windows server at my office where we connect to it using RDP from multiple locations. If I could instead buy the hardware and use cloudflare tunnels to let my team RDP to it then it would save me a lot of money. I could recoup my hardware cost in less than a year. Would this be possible? (I wouldn't mind paying for cloudflare tunnels / zero trust. It just should be much smaller than the monthly payment I make to Microsoft)
- nemothekid 2y agoI used Cloudflare Tunnels for a project that had hundreds of tunnels did roughly 10GB/day of traffic entirely for free. The project has since moved to Cloudflare Enterprise, where the project pays the opposite of free, but was completely expected as the project grew. I'm pretty sure Tunnels supports RDP and if you don't use a ton of bandwidth (probably under a 1TB/mo), Cloudflare probably won't bother you.
- philip1209 2y agoYup. Cloudflare's typical proxy already handles massive amounts of traffic, so I expect that the marginal cost of this reverse proxy isn't that high. I do think Cloudflare has proven itself to be very developer/indie-friendly. One of the only tech unicorns that really doesn't impose its morality on customers.
- boogieup 2y agoThat makes sense, because serving a web page to a few hundred people is not a computationally expensive problem. :3
- philip1209 2y agoI self-host analytics on the box (Plausible), which is using more resources than the website. There are a few apps on there, too.
- ekianjo 2y agoPlausible is hardy compute intensive
- aurareturn 2y agoThat's amazing. Mac Mini is very efficient and is a great little home server. Idles at 3-4w total for the entire machine. Plus, the M4 is a beast of a CPU. It might even be possible to serve a small LLM model like a 3b model on it over the internet.
- philip1209 2y agoYeah, the mac minis can have up to 64GB of ram which would support some usable models. However, I accidentally got one with 24gb of ram, and my apps already use 12gbs. So, perhaps I'll get a second box just for LLMs!
- aurareturn 2y agoA small model like 1B or 3B should be ok with 16GB. I was thinking in the name of savings, you can just use the same machine. It's a cool project. I might do it too. I have an M4 Mini sitting on my desk that I got for $550.
- deleted 2y ago[deleted]
- AlchemistCamp 2y agoA mac mini is pretty beefy for hosting a blog! I’ve had a number of database-driven sites hosted on $5/month VPS that have been on the front page here with minimal cpu or memory load.
- philip1209 2y agoIt's hosting a variety of apps - blog (Ghost), plausible analytics, metabase, and soon 3 Rails apps. It's unfortunately running Postgres, MySQL, and Clickhouse.
- fsndz 2y agothe article is AI-generated isn't it ?
- philip1209 2y agoNope
- fsndz 2y agoLol, by just reading I knew it was. Then I used an AI detection tool and it says 100% sure it is AI-generated. You know how hard it is to get 100% sure it is AI-generated ?
- tim333 2y agoYou can kind of tell it's not AI when it gets beyond the generic stuff and on to say >Today I'm working on Chroma Cloud, designed for exploring and managing large datasets, and Next.js powers its advanced interactions and data loading requirements. which is unlikely to have been written by an LLM.
- fsndz 2y agoyou can inject personal stuff to make it feel original, but huge chunks are still AI-generated. Just get the first 4/5 paragraphs and paste in gptzero
- tim333 2y agoWell on the one hand you have gptzero saying it's in the style of AI which I don't count as reliable and on the other you have the author saying it's not which I weight higher. And it mostly makes too much sense apart from "most drivers don't know how many gears their car has" which has me thinking huh? It's usually written on the shifter.
- philip1209 2y ago
- psnehanshu 2y agoI see you're serving a GTS certificate. Does GCP allow you to download TLS certificates? I honestly didn't know. I thought just like AWS, you get them only when using their services like load balancers, app runners etc.
- yla92 2y agoNot OP but the site sits behind Cloudflare and Cloudflare uses Google Trust GTS and LetsEncrypt for Edge certificates. https://developers.cloudflare.com/ssl/reference/certificate-authorities/ https://developers.cloudflare.com/ssl/reference/certificate-...
- dakiol 2y agoHow much does it cost to keep the mac mini on for a month? I’ve been thinking doing the same.
- philip1209 2y agoNot sure - I could hook up an energy monitor and run some math. But, I don't think the marginal internet cost or electricity cost are really much.
- renegade-otter 2y agoHosting from home is fun, I guess, but it actually was a money-saving exercise before the cloud. I've done it. Now, however, what is the point? To learn server config? I am running my blog with GitHub pages. A couple of posts made it to the top of HN, and I never had to worry. Always bewilders me when some sites here go down under load. I mean, where are they hosting it that a static page in 2020s has performance issues?