Earlier quoted context omitted.
> there is some small downtime when I deploy new versions of things Some time ago I was looking for an easier way to fix this. It seemed to me that a good way would be to have the reverse proxy (e.g. nginx or similar) hold the requests into the app restarts. Fit the user, this would mean a ~10s hiccup rather than 504 errors. I didn't find an easy way to do it with nginx though and was sort of disappointed. Maybe othe…
This would be a cool feature for reverse proxies to have.
Self-Hosting Dozens of Web Applications and Services on a Single Server
211–220 of 285 posts
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#212Great post with lots of details. I'm sure I'll try some of tools mentioned. We do something similar, multiple django sites and static sites on a single digital ocean droplet. We use docker for everything though, and have a single nginx listening on 80/443 that routes traffic to the sites by domain. Each site has a separate pg db and everything is glued together / configured / deployed via ansible.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#213Earlier quoted context omitted.
If you want to dynamically provision storage or grab an extra instance when you’re under load or something. It’s handy to not have to sit on a bunch of storage you’re not using just in case there’s a rush.
Unless the storage (or compute) is so cheap that it's cheaper to just always have enough on hand than bother with autoscaling and the added complexity and potential point of failure. Old-school dedicated servers are so cheap that you can match a startups' peak autoscaled load and still pay less than their "idle" load.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#214Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#215Earlier quoted context omitted.
"Easy" is probably because it boils down to, install X, Y, Z, edit config for X, Y, Z, start daemons X, Y, Z. There's no complex math or thinking involved, just plugging stuff in.
sure but you have to spend lots of time reading documentation and know stuff to figure out you need to put these things together.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#216Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#217Earlier quoted context omitted.
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…
Playing devil’s delegate with a normal process how we launch new service in big tech: 1. Have you done a security review and ideally pen-testing from a 3rd party? Are you fully TLS from end to end, are you aware of any exploitable vector from your API/UI and how you mitigate them 2. How do you handle software patching and vulnerabilities? 3. Do you consider your app Operational ready? Can you rollback, do you audit c…
>" but I still find it hard to trust everyone who DIY"
It depends on what is the actual DIY part is. In any way it is your problem. Not mine. Sorry to say but to me your whole post feels like typical FUD scaremongering client to cloud.
>"While you still need to do all this when using a Cloud providers, you probably _should_ do much more if you manage the bare metal"
No I should not probably do much more. I do much less as I have way less moving parts.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#218Three 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…
The problem with AWS is that you can’t really do anything without understanding 1. IAM, and 2. VPCs/networking. And these are probably the two most complicated parts. For DIY you’re probably best off avoiding AWS
But, I totally agree that the underlying nuance is a lot to take on when you start getting into X is required for Z which connects to A, yadda yadda.
That being said, if you choose a service and invest the time to understand it, you are availing yourself to a very wide world of technology "at your fingertips." You can most certainly say the same for DIY, just different shades of what you want to be responsible for I guess.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#219I (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…
+1 for Dokku here. Been running 10 containers on the second-cheapest Hetzner instance available for years now. Never had any issues. My only, tiny gripe would be excessive space consumption on the somewhat small 20gb SSDs you get with Hetzner VPSs.
My only, tiny gripe would be excessive space consumption on the somewhat small 20gb SSDs you get with Hetzner VPSs.
I was trying to imagine the reason for this. Is it that dokku is similar to heroku, and does a build step upon git-push-to-deploy? So assets/compilation/etc have artifacts and a cache that sticks around to help speed up future pushes/builds?Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#220Earlier quoted context omitted.
sure but you have to spend lots of time reading documentation and know stuff to figure out you need to put these things together.
But once you have, it feels "easy" (and might even look easy to someone who doesn't know the work that was put into learning it)
On a side note this is actually a problem, in my experience, if I find something easy I might not cover every edge case - I can cover those if and when they come up - but given enough potential inputs and users the edge cases always come up. And then what happens if I am unavailable at that moment, the edge cases need to be handled by people who will find the easy solution I built up incredibly hard and daunting.