Live data from Hacker News

Self-Hosting Dozens of Web Applications and Services on a Single Server

cprimozic.net

81–90 of 285 posts

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#81
post #65
post #63

Earlier quoted context omitted.

> modern desktop class hardware can do quite a bit better than [70W idle] If a €1200 built-from-parts desktop from March 2020 counts as modern desktop class hardware... this system uses 85W idle. It has an AMD CPU+GPU, is Intel and/or Nvidia any better in this regard or are you talking about more low-end hardware?

A lot of it is usually setup issues, i.e. either not enabling power saving features or hardware incompatibilities causing them to not be used. E.g. some mainboards ship with efficient power states disabled in BIOS. EDIT: e.g. for an optimized system with Ryzen 9 5950X and RTX 2070 Super apparently 40 W is doable for "sitting idly on Windows Desktop" according to reputable tests. Lower-class hardware can do less.

"40W is doable" is honestly not what I expected from your comment (I got the impression of both less and it being the default), but then again you didn't say it was "good", just "better". Fair enough, but this achievable idle consumption is still double of the peak consumption of a mid-range laptop. Either way, thanks for putting a number to it!

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#82
No need for CDN, if the connection is already setup and the server supports HTTP2 the files can be sent in parallel. TCP and SSL handshake back-n-forth will likely eat up the initial Atlantic latency. Also static content can be cached on the user device. And serving static content is well optimized in most web servers, so you do not need beefy hardware.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#83
post #62

Earlier quoted context omitted.

Where did you read that? It doesn't sound implausible, but if we're talking 70W idle for a 24/7 server, that does add up so I'd be interested in where the cut-off point is. Edit: just realized the 70W figure is in a sibling thread, not a (grand)parent, but I'm still interested regardless!

From the environment perspective, it also really matters where that 70W comes from generation-wise. If you're in an area that primarily uses Nuclear or things like Wind, Solar, Hydro, or Geothermal, that 70W of electricity isn't going to be particularly bad for the environment compared to places where it comes from Oil, Coal, or Natural Gas plants.

Generally true, although it's still a very rare exception if your energy is both green and could not reasonably have been used to reduce ongoing CO2e-intensive consumption. We still have a green energy shortage basically everywhere in the world (Iceland might be a rare exception, having green energy while not being conveniently near other countries without low-CO2e energy sources of their own).

I can use solar panels on my own roof to power an extravagant server, but it's still not really net zero (even if you would offset solar panel production and recycling) because they could have supplied to the still-very-fossil national grid if I hadn't been consuming it frivolously.

(Edit: I should maybe add that we don't all need to be saints all the time. My guilty pleasure is long showers, I enjoy those despite the power consumption being 10kW. I do better in other areas and vote with my wallet and ballot. I of course have no insight into what other energy choices you / OP / the reader makes so my comments are not meant as criticism towards any person.)

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#84
post #13

Easy setup with: - traefik (nginx proxy with auto letscencrypt) - portainer (docker container management) - fail2ban (basic security) - logwatch (server / security stats by mail) - munin (server stats) - restic (cloud backup) - unattended-upgrades (auto install security updates) - apticron (weekly info) - n8n (automatisation for e.g. quick info via telegram, if something not work) Run every app that you want in your…

A few months ago, I made an offer of $100 in one of the freelancing websites, for someone to set-up something like your configuration on one of my Digital Ocean instances. I asked for a few more apps to be installed (git, svn, etc). There were no takers :-)

I think a web site/service which lets you choose "apps" and spawns a VPS instance would be very useful and profitable (Think "ninite for VPS"). I started to work on this but never had the time to continue. With an Ansible/Chef/Puppet recipe, this should be relatively easy to do.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#86
post #28

Earlier quoted context omitted.

Raid-1 is doing exactly what you recommend without any effort. A perfect replica of the disk. And if the other one dies, who cares, the beauty of raid-1 is you don‘t need the other one to have a full copy.

I think the idea here is that RAID1 forces both SSDs to write every block at the same time. With identical SSDs and very similar write endurance profiles you're likely to have them both give up at the same time. Even just a nightly rsync would decorrelate what is right now nearly perfect correlation.

LVM snapshots of an xfs filesystem would do the same but without the jiggery-pokery of an rsync. It's atomic, too, iirc

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#87
post #51

Earlier quoted context omitted.

easy ? Is this sarcasm?

As someone running something similar, I thought it was quite easy when I first set it up: I used the similar setup of a friend as a baseline to get through the configuration. It took about 1 hour to setup the base things to have the infrastructure running. It sounds more complicated than it is.

I always hear about the easy setups, but never about total (man-hours included) cost of ownership through a couple release cycles on each component.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#88
post #69
post #38

Earlier quoted context omitted.

It's an old thing that I should probably not mention for opsec reasons since, honestly, it probably can get pwned (I would be surprised if no intelligence agency has a 0-day for it), and I keep thinking I should switch to linux-based solutions, but it just never floats to the top of my todo list. It's also a fairly big operation since I'd have to coordinate the switchover with some people and I have no idea how to go…

I’ve had this before with webmin and virtualmin (I think), but they do a lot more and effectively take over your whole server, so I’m not sure if that’s what you are looking for.

That should be fine if I can just run it in a container and simply use only the mail server part. I'll take a look, thanks!

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#89

I (my company) use a similar approach: a single dedicated server with docker containers, by using dokku [0], for an heroku-like self-hosted PaaS. Most of our applications are either: - app developped in-house (django/flask): Procfile + deploy with git push - standard app with a docker image available: deploy directly Dokku comes with useful "service" plugins for databases, auto https (letsencrypt), virtual hosts... O…

Pardon my curiosity, but do you pay for Dokku Pro?

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#90
post #77
post #66

Three independent, but somewhat related thoughts on this topic: 1). On HOWTO articles about infra (1/2): I'd like to see more articles that lead with requirements, rather than setups that then justify the setup with requirements. Like, congrats, you managed to host a bunch of web applications via containers on a dedicated server. It's really nice for a super personal project and I'm sure it helped OP gain a lot of op…

There is a life beyond AWS. I host applications (including ones responsible for 10s of millions in revenue) on dedicated servers rented from Hetzner and OVH. Do not even do containers as my normal deployment is server per particular business (with standby) and the cost of renting a dedicated server comparatively to revenue is microscopic. CI/CD / setup from scratch / backup / restore is handled by a single bash scrip…

The business benefits of the cloud are ability to scale, an API for everything, cheap automation, cheap managed services for everything, and good customer support. Like you say for your model none of those things may be important, but they're killer features for others
Post reply on HN