31 ms·
How much can you get out of a $4 VPS?
- uvesten 4y agoThe article does not really answer the question in any meaningful way, just tests a CRUD blogging server written in go, using a mongodb database (both dockerized…) If you expect any comprehensive benchmarks or testing, save the time.
- detaro 4y agoAlthough a major point with most cheap providers is what you don't get: consistency in performance and reliability. (Although $4 is not the deepest bargain barrel yet, so not necessarily that bad)
- tobiasbischoff 4y agoThese tests are basically useless as you never know how much CPU to VCPU oversubscription the provider actually runs at the moment. Problem is, that none of these providers guarantee you anything - if new hardware is hard to procure at the moment they will just increase general oversubscription. Even with a high oversubscription ratio you might be lucky finding yourself on a server where all machines are basically idle all the time and all the power belongs to you.
- deleted 4y ago[deleted]
- Gregoriy 4y ago4$ VPS will be fine intil they ban you as such load(as in the test) will violate their "good neighbor" policy
- _cenw 4y agoI can think of at least two that wouldn't. Hetzner Cloud allocates you 20TB per VPS (yes, even the cheap ones) and lets you use that however you see fit. There have been about 2 known instances of Hetzner kicking off dedicated (not VPS) customers for traffic abuse, and those customers were saturating the link 24/7 and were offered dedicated lines ahead of time. (their actual pain limit seems to be averaging over 750Mbit/s for 2-3 months). Their network team gets very upset if you scan from the instances, but not usually to keep a single limited interface from being saturated. Netcup will throttle you 100 Mbit if you exceed 80 TB a month. Even on their 3,25 EUR VPS product.
- deleted 4y ago[deleted]
- raybb 4y agoDoes anyone have tips for managing/monitoring a few cheap VPS? I have one that I pay $4 a year for and only use it as a Syncthing middle between my laptop and phone. I also have a few other small ones that I use for single purposes. However, I don't have a good way to see how much storage is on each VPS and the CPU utilization without sshing into them to check.
- kenniskrag 4y agoI use cockpit but maybe too much: https://cockpit-project.org/running https://cockpit-project.org/running
- MonkeyClub 4y agoI use cockpit widely as well. I too was initially concerned that it may be an overkill as well, but it solves so many more administrative problems than just metrics, that I’ve found it’s worth the few extra resources used.
- susadmin 4y agoI have heard Nagios works well for monitoring.
- discordance 4y agohttps://github.com/MichaelBelgium/VPS-Monitor https://github.com/MichaelBelgium/VPS-Monitor
- zer0tonin 4y agoI would use telegraf (https://github.com/influxdata/telegraf https://github.com/influxdata/telegraf) to gather the metrics you want from your servers. It has built-in functions to get metrics like disk usage, cpu, etc... From there I would export those metrics to a grafana+influxdb setup. But honestly this is because that's what I'm used to professionally. There might be simpler solutions around.
- hu3 4y agowhere can I get a VPS for $4/year? I could use one for things like remote cronjobs.
- sys42590 4y agoI'm a big fan of VMs cheaper than 5$ a month. And you can do a LOT using such VMs, now that most are hosted on SSDs instead of spinning disks. My take-away points are the following: 1) Beware of cheap OpenVZ offers (e.g. on LEB or WHT), performance is usually worse than offers with proper virtualization like KVM, and the need to patch OpenVZ into the kernel causes most offerings to use a more or less outdated Linux Kernel leading to a very questionable level of security. 2) If your VM hosts "serious" data, you should better make sure to do your research and use a reputable hosting provider. This may potentially cost a bit more but will save you a lot of headache in the future. 3) Unless it's just a toy project, you should look into enabling replication of your data across two or three different VPS providers. While this at most triples your performance, the reliability will increase at least tenfold.
- doubled112 4y agoI experimented with OpenVZ at home for some time many years ago and I'm always amazed to see that it's still offered anywhere. I'd have thought even LXC would have universally taken over by now. Who is still running CentOS 6 as a host?
- sys42590 4y agoSome companies are still offering OpenVZ because it allows to heavily oversell RAM, CPU and storage bandwidth with somewhat graceful degradation of guest performance. I think OpenVZ has kernel patches for RHEL7's 3.10.x kernel, which is supported by Red Hat till 2024. So in theory it's possible to have a secure OpenVZ VM but in reality bad practices (like heavy overselling the hardware) flock together.
- jwr 4y agoI know it's not in fashion, but I will suggest that renting physical servers is a very good and under-appreciated compromise. As an example, 45€/month gets you a 6-core AMD with 64GB of RAM and NVMe SSDs at Hetzner. That's a lot of computing power! Virtualized offerings perform significantly worse (see my 2019 experiments: https://jan.rychter.com/enblog/cloud-server-cpu-performance-comparison-2019-12-12 https://jan.rychter.com/enblog/cloud-server-cpu-performance-...) and cost more. The difference is that you can "scale on demand", which I found not to be necessary, at least in my case. And if I do need to scale, I can still do that, it's just that getting new servers takes hours instead of seconds. Well, I don't need to scale in seconds. In my case, my entire monthly bill for the full production environment and a duplicate staging/standby environment is constant, simple, predictable, very low compared to what I'd need to pay AWS, and I still have a lot of performance headroom to grow. One thing worth noting is that I treat physical servers just like virtual ones: everything is managed through ansible and I can recreate everything from scratch. In fact, I do use another "devcloud" environment at Digital Ocean, and that one is spun up using terraform, before being passed on to ansible that does the rest of the setup.
- JaggerJo 4y agoI also self host on a 4$ box. Quite impressive how much performance you get for that kind of money. Setting up and managing Postgres is a pain tho. Would be nice to have a simpler way of getting this all right.
- robertlagrant 4y agoMy great hope is either fly.io or cloudflare providing managed postgres behind their super lightweight services and networking.
- pepa65 4y agoThat's what docker is for, making setup simpler.
- baq 4y agoGetting binaries onto a box is not the hard part of administering a RDBMS
- habibur 4y agoPersonally for me the $5 ones no longer work. Nightly "dnf update" gobbles up >1GB of memory for God knows why and kills off httpd or application server randomly. But a ~$10 virtual box with 2GB of RAM works fine. Nothing to complain. I get 2TB transfer and 50 GB space.
- trollied 4y agoI just add a 4Gb swapfile using a file on the filesystem, works just fine.
- ddtaylor 4y agoSame. I even have some scripts in the past that would use more memory for some operations that would first add extra swapfile, do stuff, then remove it after.
- sys42590 4y agoAgreed, a swap(file) on a NVME SSD can keep the kernel's OOM killer away while still yielding quite acceptable performance under many workloads.
- mongrelion 4y agoThank you for this. I have been having some issues recently with one of my servers and my solution was to increase the size of the tmp mount but that's basically a Russian roulette. Enabling swap during the update sounds like an elegant solution.
- MonkeyClub 4y ago> Nightly "dnf update" gobbles up >1GB of memory for God knows why It’s for packagekit, which is known to suck in this way. A `systemctl restart packagekit` right after the update will immediately drop it below 30MB.
- szastamasta 4y agoI was running one of my products on 7 5$ instances from DigitalOcean. Which includes load balancer (Apache), database with replication, static site hosting, web app and 2 backends. It was happily serving hundreds of concurrent users with quite a lot of space to still grow. With their s3 clone and few volumes we rarely paid more than 45$ per month. You really can get far with cheap cloud machines.
- TacticalCoder 4y agoFor 5 EUR / month you can also get a dedicated server (not a VPS) from OVH. Sure it's only an ATOM N2800 with 4 GB of RAM / 1 TB SSD / 100 Mbit/s bandwith (which is definitely the bottleneck as I've got gigabit fiber to the home). But it's 5 EUR / month for a dedicated server (and it's got free OVH DDoS protection too as they offer it on every single one of their servers). I set up SSH login on these using FIDO/U2F security key only (no password, no software public/private keys: I only allow physical security key logins). I only allow SSH in from the CIDR blocks of the ISPs I know I'll only ever reasonably be login from and just DROP all other incoming traffic to the SSH port. This keeps the logs pristine. Nice little pet these are. I'm not recommending these 5 EUR / month servers for production systems but they're quite capable compared to their price.
- WrtCdEvrydy 4y ago> For 5 EUR / month you can also get a dedicated server (not a VPS) from OVH. Where?
- explodingcamera 4y agoCheck out their kimsufi offering
- prmoustache 4y agoFun fact for non french speakers. Kimsufi sounds like "qui me suffit" which is the french for "which is enough for me".
- TacticalCoder 4y agoOVH "ECO Kimsufi" offering. Now... You'll need to "refresh" regularly the page for the 4.99 EUR one (I rounded @ 5 EUR but it's 4.99) for they're in demand and often sold out. Or you write a script that monitors the page to see when they're available again. I had to wait a few days to fetch my last one but I got it. Always do : ) On OVH's website: OVH cloud / Bare metal & VPS / ECO Dedicated Servers. P.S: back in the days the "Kimsufi" (french for "qui me suffit", literally "which is enough (for me)") used to be part of OVH, then OVH spun Kimsufi out of OVH and then now... Kimsufi are back into OVH (the older Kimsufi servers are still accessed using the old Kimsufi credentials but the newer ones are using the OVH credentials again).
- pella 4y agoContabo https://contabo.com/en/vps/ https://contabo.com/en/vps/ Hetzner https://www.hetzner.com/cloud https://www.hetzner.com/cloud Scaleway https://www.scaleway.com/en/pricing/?tags=compute https://www.scaleway.com/en/pricing/?tags=compute
- Mortiffer 4y agodown vote for Scaleway, got burned by them. They changed the pricing out under me and make it difficult to migrate out. At the time there was a very restrictive upload bandwidth so it would have taken weeks to upload my database backup files to the new hetzner servers. We ended up putting effort into finding the core data which can't be lost and only uploading those individual tables/row filters. IDK how they are now but for sure go check upload limits.
- znpy 4y agoI signed up to scaleway only to find out the server I wanted to buy was out of stock. And that was not shown anywhere before the signup. So yeah, i'm downvoting for scaleway too.
- curiousgal 4y agoI've been very happy with contabo
- kissgyorgy 4y agoVertical scaling is seriously underrated nowadays. Also everyone chases those 99.99999 availability, but very few actually need it, so scaling vertically is not a problem for 99.9% startups.
- Tepix 4y agoIf you like cheap VPS, hang out at lowendtalk.com and lowendbox.com. Depending on your requirements you can sometimes get lucky at $12/year or less.
- znpy 4y ago> Depending on your requirements you can sometimes get lucky at $12/year or less. Had one of those when I was a broke student, and found that on lowendtalk.com as you suggest. Needless to say, the company literally VANISHED after a few months. If an offer is too good to be true...
- Tepix 4y agoI've had one for $8/year for five years now. Luck.
- bingobongodude 4y ago1blu is running such a deal right now (4 cores 8gb ram 120gb ssd)
- txtai 4y agoThere is also a push to run machine learning models on low-resource devices, which a $4 VPS could be categorized as. https://www.tensorflow.org/lite https://www.tensorflow.org/lite https://huggingface.co/muhtasham/olm-bert-tiny-december-2022 https://huggingface.co/muhtasham/olm-bert-tiny-december-2022 https://neuml.hashnode.dev/train-a-language-model-from-scratch https://neuml.hashnode.dev/train-a-language-model-from-scrat...
- smileybarry 4y agoI remember some CPU-overloading loads categorized as "mining" in various cloud providers and shut down. I wonder if ML training will cause the same false-positives. (Or "true positive" in the case of "excessive load not allowed" providers)
- txtai 4y agoThis concept was more for inference on-demand vs training a model. For example, if there was an API call that had a model call as part of it's workflow. Training even a small model still requires serious compute power.
- samsquire 4y agoI'm a devops engineer and I would prefer not have to worry about scaling or unexpected costs from the provider. My dream SAAS or cloud company is one that does payments and revenue to resource scaling. They integrate your payments solution of customers to scalability of your infrastructure. In other words, the more active customers you have the more capacity you have. They would handle all the payments collection and take a cut of your revenue. The guarantee is that you can handle any number of customers based on the number of paying customers.
- wnolens 4y agoBut then it's static while transactions aren't occurring. This only makes sense to me in a system in which the load IS a transaction like a payment gateway, or a strict single tenant architecture. You're not gonna scale when a customer bursts because they didn't know enough in advance to pay you before?
- samsquire 4y agoI assumed that the provider of said service would have profoundly scalable systems that can absorb load fast, similar to AWS Lambda and Firecracker VMs.
- quickthrower2 4y agoThe ideal model might be customer pays for hosting direct from the cloud provider then buys your app service as an add on install. Sound crazy? Same principle has worked since the 80s: the personal computer!
- rwaksmunski 4y agoNot sure about $4 but for $40 I get a dedicated box with Intel i7-8700, 128GB RAM, 1TB of NVME storage and 1Gbe of bandwidth at Hetzner. That is a lot of machine for the money.
- im_jerry87 4y agoNo way you are getting a dedicated box with 128 GB RAM and 1 TB NVME for just $40. Are you referring to server auction?
- _cenw 4y agoEven server auction isn't anywhere close. 55 EUR will get you a Haswell-era Xeon with spinning rust and 128GB of ECC DDR3. The cheapest Ryzen with a RAM upgrade does get pretty close too, and at least that's a modern CPU.
- rwaksmunski 4y agoSniped a deal at the server auction, it's closer to $43 at today's exchange rate.
- einpoklum 4y agoFor those who don't know the lingo (like me): "A virtual private server (VPS) is a machine that hosts all the software and data required to run an application or website. It is called virtual because it only consumes a portion of the server's underlying physical resources which are managed by a third-party provider. However, you get access to your dedicated resources on that hardware." (define on Amazon's website)
- KronisLV 4y ago> I used K6 to perform a load test. K6 is a software that will generate “virtual users” who continuously run test scenarios defined using javascript. K6s is a pretty good load testing tool, however my problem with it is that it doesn't simulate everything a browser does: fetching all of the image files, fonts, as well as anything that might get downloaded and executed after upgrading the version of your application with some new functionality, but forgetting about adding new API routes etc. to the tests (e.g. if a new panel in the app gets loaded even without explicit user input, say, a new UI improvement with some useful data). You might need to do updates to your test code with each next app version for this, a relatively high maintenance approach. The way I've worked around this previously was setting up Selenium + Python inside of containers that were assigned system users through a centralized service I wrote for that and then used the site in question like a real user would. It was pretty close to the real world, though sadly didn't scale too well - because with each automated browser instance needing ~512 MB of RAM, only small amounts of users could be viably tested. Either way, small VPSes are still a great option in my eyes! Here's a few providers that I've personally found viable: - Hetzner: https://www.hetzner.com/cloud (time based billing, good selection of services, also allows easily attaching more storage etc.) - Contabo: https://contabo.com/en (pretty good option, the UI used to be a bit antiquated, there are setup fees, apparently a bit overprovisioned) - Time4VPS: https://www.time4vps.com/?affid=5294 (I use them for my sites, affordable and stable, though not as modern as Hetzner; affiliate link, remove affid otherwise) - Scaleway: https://www.scaleway.com/en/stardust-instances/ (overall expensive, but their Stardust offering is pretty good, when available, which isn't that often) Apart from that, it can also be quite useful to take some old hardware and turn it into your own homelab - I'm currently doing that for my NAS, backup nodes and CI nodes, just a few AMD 200 GEs with 35 W TDP that are way cheaper than anything that actually needs good uptime. For example, buying a 1 or 2 TB HDD for storing data is cheaper than most cloud options, even when you include additional expenses for backups. As for compute, it varies - if you have workloads that need to infrequently do lots of number crunching, the cloud can be cheaper, actually.
- newaccount74 4y agoI've been running my company website for years on $5 Linode. I used to host everything on there (downloads, update checking, crash reporting, licensing, a Postgres database for everything). I've never had any performance issues. A $5 VPS is plenty for Apache, PHP, PostgreSQL, for a few thousand users a day. I've started using multiple VPS, one for each service. Not for performance reasons, but for two things: - isolation: if there's a problem with one service (eg. logs used up all disk space) it doesn't bring everything down at once - maintainability: it's easier to upgrade services one by one than all at once
- edsonmedina 4y agoconclusion: inconclusive
- throwawaaarrgh 4y agoDoes anyone here remember developing applications on machines with 25MHz of CPU and 8MB of memory? That VPC has probably 1GHz CPU and 1GB of memory. How you develop an application depends completely on what you have available to you and what its use case is. If you don't have money, design it to be resource-efficient. If you do have money, design it to be a resource pig. If it needs to be high performance, design it to be very efficient. If it doesn't need to be high performance, just slap something together. As a developer, you should know how to design highly efficient apps, and highly performant apps, and how to develop quick and dirty, and how to design for scalability, depending on the situation. It's like being a construction worker: you're going to work on very different kinds of buildings in your career, so learn different techniques when you can. I highly recommend, for fun, trying to develop some apps inside a VM with very limited resources. It's pretty neat to discover what the bottlenecks are and how to get around them. You may even learn more about networking, file i/o, virtual memory allocation, CoW, threading, etc. (I wouldn't use a container to start, as there's hidden performance issues that may be distraction)
- pjc50 4y agoYup. I think HN skews surprisingly middle-aged now, and therefore many of us remember that era. You can do a lot on a tiny server if you're efficient.
- megous 4y agoFor a few years I did run my mail/web/... servers on a light virtualization host that billed by actual memory, disk and CPU use by minute. It's amazing what optimizations one finds to lower the resource consumption when it has direct effect on the price. At times I was running for $0.5/month :D
- elforce002 4y agoVultr has $3.5 VPS and I'm loving it.
- BilalBudhani 4y agois that ipv6 server only? If yes, I'm curious what do you use it for?
- elforce002 4y agoThey have $2.5 VPS IPv6 only. The other one has IPv4.
- redman25 4y agoYou could use it for a publicly accessible static ip for vpn, ssh, etc. I have an ipv4 one from before those instances went ipv6 only.
- optimalsolver 4y agoCan also recommend Vultr. Been using them for years now with no complaints.
- hereforphone 4y agoI just had a huge bad experience at vultr with 3 days of downtime and poor customer service. I tried to elevate it to the CTO but he ignored me.
- jasfi 4y agoYou can get a lot of power for your money with Zap Hosting (https://zap-hosting.com https://zap-hosting.com). I've been quite happy with them.
- tgtweak 4y agoThrow free cloudflare tier in front of it and you can get pretty far on $4/mo.
- tgtweak 4y agoPutting my recommendation in for vultr - have used them for many years and have had very good results off of a cheap vps. Also trivial to migrate and upgrade hosts on the fly. Someone had a site set up to measure VPS providers by running a suite of tests every hour and collecting the results by hosting provider. Was surprising to see transient performance degradations, downtimes and stark differences in performance for "2 vcpu 1gb ram" depending on the hardware underneath and level of overprovisioning. Edit: the aptly named https://www.vpsbenchmarks.com/screener https://www.vpsbenchmarks.com/screener
- hereforphone 4y agoI used Johnscompanies, Linode, DigitalOcean, then Vultr. Vultr shocked me by how poor their customer service was, after 3 days of downtime, multiple claims of fixing the issue soon, and not bothering to notify me when it finally was fixed. I didn't experience that at any of my previous hosts.
- tgtweak 4y agoYeah the CS isn't excellent but it is mostly for self-supported workloads. Like OVH - if you need support for anything beyond provisioning/troubleshooting things outside of the VM, it's not the best choice. If you compare it with ec2 support costs + vm costs... it's difficult to have it all. Digital Ocean does a good job of support too, but I'd rather not need support (with most tooling self-serve) than have support but have issues. I've had VMs at vultr running for 3+ years with very few issues (one host migration which they did "live" for me and notified me a few days in advance). I've had more issues with degraded instances in ec2 that require a ticket sent to ec2 support and 3-days wait for them to assign it to a new host.
- wrycoder 4y agoJohncompanies http://www.johncompanies.com/ http://www.johncompanies.com/
- hereforphone 4y ago
- lizknope 4y agoMy VPS is $1.67 a month from buyvm.net I run a web server with family photo albums that are all static pages. My friends and I use it to exchange files. I also use it as a SSH reverse tunnel relay to access my home machine from outside. I don't really need to do anything else and it works well for that.
- shiftpgdn 4y agoipv4 addresses are approaching $50-60 per address. The days of cheap ipv4 vpses is almost over.
- dolmen 4y agoSo what about cheap IPv6 only VPS?
- kccqzy 4y agoI believe the price you are quoting is for buying an address. When you rent a VPS you are only renting an address.
- shiftpgdn 4y agoHow could a company make any money renting an IPv4 address for $1-2/month when it cost them $50 for the address.
- narag 4y agoI rented my first VPS 15 years ago and it was cheap. IIRC the VPS software was called Virtuozzo. Since I was using Java at work, it seemed a good idea to install a Java CMS: https://pebble.sourceforge.net/ https://pebble.sourceforge.net/ But it was not so easy. Java refused to start with an out-of-memory error. It took me many hours to find out that the VPS had assigned very little memory at start. It was possible for the JVM to expand once running, but the initial request had to be small enough to avoid the error and not so small as to prevent Pebble from running. Once this problem was fixed and iptables set, everything was fine. I even setup postmail. But the experience taught me that a VPS has different rules. I wouldn't trust the measurements in the article. They could depend on the load that other VPS in the same machine are supporting at the same time.
- comprev 4y agoI have worked with several small clients to migrate away from AWS/Azure instances onto dedicated hardware from Hetzner or IBM "Bare Metal" hardware. The question I ask first is: as a company, what is an acceptable downtime per year? I give some napkin calculated figures for 95%, 99%, 99.9% and 99.99% to show how both cost and complexity can skyrocket when chasing 9s. They soon realise that a pair of live/standby servers might be more than suitable for their business needs at that particular time (and for the foreseeable future). There is an untapped market of clients moving _away_ from the cloud.
- bak3y 4y agoI've always heard that adding another 9 adds another 3 zeros to the cost.
- VikingCoder 4y agoWe need nine 5s of uptime. 55.5555555% uptime AT LEAST.
- zamadatix 4y agoAt one dollar for 99 that's a billion dollars for 99.999. Seems a bit extreme on each end for a three 9's difference.
- njovin 4y agoIME many companies claim 99.99+ uptime but then the penalties are trivial. If a 99.99 SLA is busted with an hour of downtime in a month but the penalty is 5% bill credit, the company just lost $500 on $10k revenue, assuming that: A) Customers actually chase the credit, which (again IME) many companies make very difficult B) The downtime is very clearly complete downtime. I've seen instances where a mobile app is completely down (but the web product works) or a key API is down (but the core product works) or there are delays in processing data (but eventually things are coming through). All of these can cause downstream downtime to customers but may not be covered by a "downtime" SLA.
- Andrew_nenakhov 4y agoYou can run at least 1000 xmpp active xmpp connections.
- ec109685 4y agoThese test results are surprising. In my experience, when the server cpu is pegged, it causes latency to shoot through the roof unless the number of parallel requests is finely tuned. In this case, there are max 50 workers hitting the server, so you’d expect 50 parallel requests to be outstanding at once. 1300 req/sec with 50 workers, would be 26 msec/req, which matched the results. So I wonder why the server being pegged didn’t affect things more? Super curious what the server side metrics were during the test.
- ec109685 4y agoI guess one explanation is that given the load test isn’t sending constant traffic but each virtual user instead waits for each request before sending the next one, it naturally starts throttling. Constant Load, which k6 supports, can help pinpoint the server’s breaking point.
- zer0tonin 4y agoYes this is a valid point. I didn't think of using constant load at the time of writing the article.
- Havoc 4y agoExcept the $4 vps generally have fair use clauses. So you can’t actually sustain what the load test shows. 20% of it is common as reference point for sustained use though often judgemental
- tomxor 4y agoOne word of caution: The smallest VPS are also the most unreliable in my experience. If that's a requirement of your low compute project, it may make sense to massively over provision with either a more expensive VPS or dedicated server. I'm not sure why but I suspect it's some combination of older server hardware being relegated to host lots of tiny VPS (which tend to host less uptime-critical things). Sharing the hardware between more VPS giving rise to more problems, e.g abuse, or over loading since they will be on average under-provisioned. This is of course completely anecdotal, historical and speculation, some providers offerings may be just as stable at the bottom end. But it's certainly more likely at the bottom end.
- Tepix 4y agoIf you put several of these ultra cheap VPS behind something like Cloudflare, doesn't that mostly solve the problem with them being down every now and then?
- tomxor 4y agoSure, if it's simple to horizontally scale your service. But unless it's a simple static site it's usually not, and it's usually a source of a lot of complexity and pain. Which unless you really are doing something twitter scale, is not worth it. By the time you've bought a handful of tiny VPSs and put in the work to horizontally scale your service, you could have put the same money with zero effort into a very reliable dedicated server. Spend the effort elsewhere and save your sanity (and probably improve your reliability). Yes I'm biased against horizontal scaling.
- margorczynski 4y agoI guess you would need to take care additionally for perfect replication of the stateful sources of truth like a RDBMS to not loose consistency
- _cenw 4y agoCloudflare isn't going to do load balancing for free, neither do most VPS providers (if at all), and you're likely making some network admin angry trying to run something like keepalived, but it sure is true that building your systems to be fault tolerant comes with the option of using cheaper "base resources".
- r3trohack3r 4y agoI’ve recently started deploying on Cloudflare workers. They’re cheap and “infinitely scalable.” I originally picked them for my CRUD API because I didn’t want to have to worry about scaling. I’ve built/managed an internal serverless platform at FAANG and, after seeing inside the sausage factory, I just wanted to focus on product this time around. But I’ve noticed something interesting/awesome about my change in searches while working on product. I no longer search for things like “securely configuring ssh,” “setting up a bastion,” “securing a Postgres deployment,” or “2022 NGinx SSL configuration” - an entire class of sysadmin and security problems just go away when picking workers with D1. I sleep better knowing my security and operations footprint is reduced and straightforward to reason about. I can use all those extra cycles to focus on building. I can’t see the ROI of managing a full Linux stack on an R620 plugged into a server rack vs. Workers when you factor in the cost of engineering time to maintain the former. I do think this is a new world though. AWS doesn’t compare. I’d pick my R620s plugged into a server rack over giving AWS my credit card any day. AWS architectures are easy to bloat and get expensive fast - both in engineering cost and bills.
- haolez 4y agoWhat are you using to manage your schema? Do you use an ORM? Maybe something like PocketBase[0]? [0]https://pocketbase.io/ https://pocketbase.io/
- matthewfcarlson 4y agoI looked at pocketbase and other tools, but decided to keep it simple. Like GP, I'm also using D1 (https://developers.cloudflare.com/d1 https://developers.cloudflare.com/d1) which is based on SQLite and still in early Alpha. In combination with KV (https://developers.cloudflare.com/workers/learning/how-kv-works/ https://developers.cloudflare.com/workers/learning/how-kv-wo...) it's trivial to have a great database layer with caching using kysely (https://github.com/aidenwallis/kysely-d1 https://github.com/aidenwallis/kysely-d1) and trpc (https://trpc.io https://trpc.io) you can have typing from DB to front end.
- r3trohack3r 4y agoNope. Just have a directory: ./sql/0001_create_users.sql ./sql/0002_create_sessions.sql .... Each query for modifying the schema is idempotent and safe to be rerun. Then I do: ls ./sql | xargs -I{} wrangler d1 execute <db> --file {} Can put that in a script to make things easy. You use the same script to modify the db as you do to bootstrap a db from scratch.
- jacooper 4y agoYou can get a better VPS with oracle Free tier, just make sure you have backups.
- ilitirit 4y agoAlso make sure you know how the pricing works. There's a specific configuration that enables 4 ARM CPUs, 24GB RAM, and 200GB disk space on the free tier.
- pgm8705 4y agoEspecially if you can run your stack on their Ampere processors. 4 vCPU and 24GB RAM... for free.
- t344344 4y agolast time I checked, they required credit card, sort of "free trial" roulette
- altbdoor 4y agoSigned up with a region, always out of any free availabilities, locked out with no way to change regions, unless if I sign up with a different email address.
- conductr 4y agoThe part I hate most is the security aspects. Keeping things up to date, port blocking, iptables, firewalls, etc. Anyone know if there’s a SaaS that just ssh’s in and does that stuff? I use serverpilot.io but it’s aimed specifically at DO + PHP, and would like more flexibility on which core services could be installed.
- Tepix 4y agoDo the initial setup with Ansible. It should be static unless your application changes. Also it's hard to do it as a service because it really depends on your applications. Keep the boxes up-to-date with "unattended-upgrades" or similar.
- conductr 4y agoThanks, I'll check out Ansible
- RealStickman_ 4y agoIf you use additinal repos, make sure to add those to the unattended-upgrades config as well. And reboot your servers regularly.
- d23 4y agoWith respect to port blocking / iptables / firewalls, what do you need to do other than shut off all ports other than the one(s) you're serving on? And for updates, I don't know that any other provider does this any differently. You'll have to do some work, but that's what I'd prefer anyway; the last thing I'd want is AWS automatically upgrading the OS of live production systems without me testing it first.
- conductr 4y agoIt's a good question and the answer is I don't know what I don't know when it comes to this stuff. Perhaps I've been overthinking it, but I feel like there's some gapping hole I'm leaving exposed. If that's all there is to it then I feel better already about a DIY approach. But for instance, SSH port has to remain open just so I can get in. I read occasionally about OpenSSH, or some foundational level service, being exploited. Is it common to just have to follow the security issues of every service and rush to patch accordingly, or is there something that helps automate this part? I do agree that there are some core services that I don't want changing out from under me without my notice/prior testing. But then there's also a lot of stuff installed that I don't use directly (eg OpenSSH) in my application and I'm not sure if those are attack vectors.
- kristianpaul 4y agoA lot? https://lowendbox.com/blog/yes-you-can-run-18-static-sites-on-a-64mb-link-1-vps/ https://lowendbox.com/blog/yes-you-can-run-18-static-sites-o... Its 2009 but the point imho is that with floss there are always alternatives
- kristianpaul 4y agoTry also google always free tier first and see what you can get done with that for a start https://cloud.google.com/free/docs/free-cloud-features#compute https://cloud.google.com/free/docs/free-cloud-features#compu...
- guardiangod 4y agoI've used everything from expensive dedicated servers, cheap dedicated servers (Atom, Pentium 4), to all levels of VPS, cloud VPS, and now I finally settle on hosting everything in my parent's home. With gigabit symmetric fiber connection (that I paid for) I don't see why I need to host stuff on other people's infrastructure. I can control backup in person. I don't need to worry about the hoster upgrade a SAS controller and boink the RAID-ed hard drive, or complaints about copyright materials etc, or the hoster snooping on the servers for sensitive data, or that the hoster suddenly go out of business and take all my data with it, or that I reach the monthly 1000TB limit. My parents even get to use gigabit connection for free so it's a win-win.
- pknerd 4y agoAm I the only one who googled about the company offering $4 VPS?
- grapesurgeon 4y ago[dead]
- rcarmo 4y agoHosting stuff on small machines was why I came up with https://github.com/piku https://github.com/piku, and I still use it for those - I spent a long time trying to cram LXC, Docker and the like into single-core machines, and wanted a way to make it as painless as possible. These days I’m running my static site builder, a few scrapers/RSS converters and a number of Mastodon-related services on it, on various kinds of cloud and physical hardware…
- tw1984 4y agofor me, thanks to the Great Firewall, a $4 vps makes the difference of whether I can visit HN or not.
- renewiltord 4y agoDoes anyone know of the equivalent of Terraform for on-prem hardware? I explicitly do not want an automated agent that applies things or anything like that. I want to do this: - image some hardware with Ubuntu - set up SSH - write a definition file, HCL is fine - run a program that uses the definition and the IP address of the machine that applies the definition installing files, programs, whatever or removing them It would be cool if: 1. There were a terraform provider for this 2. I can specify which IP address the hardware is at 3. `terraform apply` and be done with it The cloud is absolutely fantastic for lots of things, and we have a mix of cloud infra and on-prem hardware. Ideally, I'm looking for something a 4-person team can manage with some wiggle room for failure. If we hit 99.9 we're fine, maybe even get by with 99. After all, the alternative is that I reimage one of the servers on the few racks we have and it takes precious time but it's not really a problem.
- dpedu 4y agoI'm a heavy terraform user and I want something like this too. HCL and the surrounding tooling is just so nice. I mainly use puppet to manage my hobby machines & VMs, and puppet does violate the agentless bit you mentioned. What I like about it (over something like Ansible) is that it understands the resource dependency tree like Terraform does. Furthermore, I've set up my implementation so that it restores backups after installing services. So, for me, rebuilding a server is simply running a backup (optional) and then wiping the box. I saw a libvirt provider for terraform recently that can SSH to a host and then operate the libvirt API on it. That seems like a good starting point for something like this; take the SSH parts and use it to manage resources like files on the remote host. I've written a few simple terraform providers, it's not that hard to do. This sounds like a fun project and I'm pretty tempted to do this, actually.
- aka878 4y agoA lot. I remember self-hosting VPN and cloud storage (OpenVPN and Nextcloud) at the same time on AWS for <= $5.
- jahewson 4y agoDollar store hosting providers have dollar store security practices. I would never trust them with user's data.
- bob1029 4y agoI think the biggest thing that snipes a lot of technology teams is some notion that production can never ever go down no matter what. Every byte must be synchronously replicated to 2+ cross-cloud regions, etc. Not a single customer can ever become impacted by a hacker, DDOS, or other attack. Anyone in this industry is prone to these absolutist ideologies. I wasted a half-decade chasing perfection myself. In reality, there are very few real world systems that cannot go down. One example of a "cannot fail" I'd provide is debit & credit processing networks. The DoD operates most of the other examples. The most skilled developer will look at a 100% uptime guarantee, laugh for a few moments, and then spin up an email to the customer in hopes of better understanding the nature of their business. We've been able to negotiate a substantially smaller operational footprint with all of our customers by being realistic with the nature and impact of failure. If you can negotiate to operate your product on a single VM (ideally with the database being hosted on the same box), then you should absolutely do this and take the win. Even if you think you'll have to rewrite due to scale in the future, this will get you to the future. Periodic, crash-consistent snapshots of block storage devices is a completely valid backup option. Many times it is perfectly OK to lose data. In most cases, you will need to reach a small compromise with the business owner where you develop an actual product feature to compensate for failure modes. An example of this for us would be emailing of important items to a special mailbox for recovery from a back-office perspective. The amount of time it took to develop this small product feature is not even .01% of the amount of time it would have taken to develop a multi-cloud, explosion-proof product.
- turtlebits 4y agoThe problem is that not all $4 VPS offer the same baseline perf. Unless you have the time/money to go sign up/provision/load test from a set of providers, it's definitely hit or miss. That said, you shouldn't dismiss cheap hosting, I use a $4.5 VPS to constantly encode h.265 and it's been a great value.
- outworlder 4y ago> For the database, I chose to use MongoDB. I picked it because it is simple to set up, popular, and claims of being web scale. "web scale", but it's on a $4 VPS? What does that matter? I expect PG to do better.
- lbriner 4y agoPretty typical BS article. Profile a pointless small app (written in Go, fast but used by very few people) and then caveat that your mileage may vary. It sure does. Having to size for peaks and troughs, for when the updates are running, for when you get a spike in traffic, for when you need to use a slightly under-performing DB library or some connections to cache. The only thing this small server would be any good for would be a static web site, pretending that any web app would work on a tiny vps is just not true.
- 77pt77 4y agoMy VPS is about $15 a year. I run my own OpenVPN, ssh, SMTP (postfix) and even http(s) and dav server. I also have a wiki and an ftp server. Most of the services are on the VPN private address space. I honestly don't need to look for alternatives. It's far more than enough.
- maerF0x0 4y agoIt used to be that growth rate and market capture was the most important metrics. The value of a marginal feature was far in excess of anything that would save money on infra, or that might delay engineers from deploying the next feature. With the fed increasing rates, engineer salaries falling, and the market now valuing profit over sales, this is no longer true. The companies that do not adapt to this reality will have subpar results.
- flumpcakes 4y agoI pay for a VM that is not hosted on the major cloud platforms, it comes with 6 cores, 16GiB RAM, 100GiB NVMe, a public IPv4 address, and 32TiB of bandwidth (supposedly I've never even used 1% of that) for 15 euro a month. It can handle anything I could throw at it. I currently use it to test kubernetes deployments with helm and k3s. You cannot get anything anywhere close to that in Azure, GCP, AWS, etc. for that price.
- INTPenis 4y ago> I pay for a VM that is not hosted on the major cloud platforms Where?
- flumpcakes 4y agoContabo - I pay a few euro more for the luxury of having the VPS in the UK. I think you can get the same specs for 13 euro if it is hosted in Germany.
- Ologn 4y agoI've had a $20 a month Linode VPS for over ten years. I have a $13 a month Ramnode VPS as secondary or backup for a lot of things, like DNS. At one point I was pretty steadily making $2000 a month revenue on my side business, sometimes peaking to $3000. Mostly serving up JSON (or XML at one point) as well as media like PNGs or epub's or the like. The Linode has 4 gigs RAM, 2 CPU cores, 80 gigs storage, runs Debian. I'm given 4 TB of net traffic a month, but I never even got to 1 TB a month. I did look at VPS's which were even cheaper at the time - less than $10 a month, but I passed on them, $400 a year for VPSs was within my allocated budget, especially since revenue was over $20,000 a year.
- sideproject 4y agoI've always been pretty cheap with my spendings on VPS. So, when building my web applications, even if the traffic is building up, I opted into optimizing before upgrading hardware. I've been doing this for more than 10 years and I've been making incremental (sometimes really small) improvements to the way my web apps work so that I rarely need to go down to AWS, k8s, load balancer etc etc way. Sure, these are personal projects and of course there is a diminishing return on optimizing (so I do upgrade hardware when I need to), but I always found it a rewarding challenge to first look at understanding the inherent issue, rather than just throwing money at it (at my work, it's completely opposite - see an issue? throw money and upgrade hardware ASAP and move on). Some things I've done for optimizing are... - Simple upgrading of software - going to latest postgres, upgrading PHP - Identifying data that are not frequently updated and then caching them - I've identified some bot traffics coming from China, so for one of my projects, I just blocked it completely (yeah, drastic I know, but not worth my $2!!) There are also many many services out there that provide free tiers that you can utilize. So as a solo, indie dev, there are many ways to leverage to stay on a cheap $5 linode box as long as you need (I saw recently a box for $2.50 - tempting...)
- jmconfuzeus 4y agoI recently migrated a client's app to a $10 VPS. Before that, the app was running on AWS with a couple EC2 instances, RDS, and lambda costing about $300/month. The client was skeptical and asked about whether it's gonna be stable and scalable. 3 months later, the app is running buttery smooth.
- LAC-Tech 4y agoNote to self - remember to use k6 next time you have this problem.
- GaNuongLaChanh 4y agoInteresting post, just my share: asmBB.org is running on a 4$ VPS and not a crash since the first run, it’s written in Assembly btw
- mechanical_bear 4y agoWhat a terrible blog post. It basically ends with “well, this test is meaningless under real world conditions.” How about some more robust testing that mimics real world scenarios?