3 ms·
The answer is cheap shared hosting that supports old-school standards: CGI (or FastCGI), and your choice of Perl/Python/Ruby/NodeJS/Go/Rust/etc. For a hobbyist
by fennecfoxen 11y ago
The answer is cheap shared hosting that supports old-school standards: CGI (or FastCGI), and your choice of Perl/Python/Ruby/NodeJS/Go/Rust/etc. For a hobbyist project with minimal traffic, you can afford to deal with the application's startup latency. (Java / Scala are probably out, though. Don't know about Erlang, haven't used it).
Dreamhost is affordable enough and will do such things.
- merb 11y agoI've setup Java/Scala projects on 5 USD hosts. Why are they out? With SSD's you could even run a bunch of them thanks to swapfiles.
- fennecfoxen 11y agoOh, they're out for shared-hosting CGI/FastCGI only, because of high startup time and high memory usage and the fact that no one in Java ever uses that deployment model. If you're doing droplet-based stuff I'm sure it could work, but I don't think the author is satisfied with the costs of running multiple projects.
- brianwawok 11y agoJava / Scala can get dicy on $5 host. Problem 1) SBT cannot run with 512 ram, so you cannot compile locally. If using phat jars, that means you need to upload a 100mb jar every time you want to deploy, vs just a git pull and a build. May or may not matter to you. Problem 2) Once you start doing some actual work, the JVM itself is taking up a few 100 MB of ram, and the OS takes up a fair bit.. this leaves something like 128MB ram for your app best case.. for a lot of apps this is not enough. I had to go up to at least 1 GB VMs to get my medium complexity Scala app to work in prod, and I have been tuning JVMs for many years.
- merb 11y agofallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile swapon -s Works pretty well. You can't actually run too much on it however if you use a tomcat you actually get a decent Request per Second something like 100r/s. And you don't need 1GB VMs. 512 MB Scala Apps are working fine. It just depends on the technology.
- tdeck 11y agoI've had success running several things on Dokku, on top of a $5/month DigitalOcean droplet. You do have to create a swapfile to compensate for how little RAM there is, but after that Dokku is very easy to set up, and provides Heroku-style git push deployment for many different languages and environments. It also makes it very easy to set up databases (postgres, redis, memcached, etc...), and as an added bonus there's a great Let's Encrypt plugin that makes adding TLS a ten second job.