Server-side technology options and my hosting solutions

Last year I started focusing on web and application development to a greater extent than what I have done in the past. After having done my time with large enterprises, I now work primarily in a super cost-conscious market. All those things speak poorly about my budgeting and planning skills as far as server hosts are concerned.

tldr;

Problem

I build applications that need a backend. I need that backend to be inexpensive but reliable.

Solutions

Typically, I have deployed server-side solutions on Node and Laravel, and using MySQL and Postgres. But the work spans to static sites, Wordpress, and ASP.NET.

The initial part of starting up a business and establishing credentials through fast and reliable applications was difficult. But, what made it more difficult than the bugs I introduced on my own, was the server infrastructure.

I have been partial to NodeJS, and my natural tendency is to use Virtual Private Servers (VPS). I do not quite need dedicated hardware since I hardly run applications that deserve that kind of hardware, but I was not able to sustain applications on shared hosting.

The good thing - it has never been as good as it is today.

I continue to be amazed at free (GitHub, Netlify, GitLab - thank you), or inexpensive infrastructure solutions. Those solutions have made possible for me to run a highly nimble shop that focuses on client-specific solutions at highly reasonable costs.

But, I have been seriously frustrated by my initial decisions. I have paid for products and services that have gone south, crippling my sense of self-worth and that of humanity in general.

So, a summary of what to do follows.

Digital Ocean

Choose Digital Ocean* for your VPS.

Digital Ocean provides the max leverage when it comes to providing reliable, inexpensive infrastructure. Starting at \$5, Digital Ocean has enabled me to stand up servers within no time - be it development, production or for dedicated demos.

More over, Digital Ocean has been a big boon since they have excellent connectivity and servers available in multiple regions.

The availability of templates have made it much easier to setup servers with pre-installed software. This is particularly useful for development and initial testing, and also because I suck at Docker, Ansible, Terraform et. al. - I am lazy enough to learn them thoroughly and stop wasting time setting up environments.


Pros -

  • Excellent infrastructure
  • Minimal ping times at multiple locations
  • Reasonable price
  • Templates!

Cons -

  • DIY. Databases can go down, Web servers can get messed up, external attacks can be a big problem
  • “Cost conscious” customers may still find that expensive for smaller solutions (when you cannot share servers with others)
Use Hetzner Cloud

I did not quite know Hetzner Cloud for a long, long time. I had favoured cheap-ass VPS solutions to burn fingers and a bit of my brain more than once - and came to know about them by chance.

But now, every other of my application goes to Hetzner Cloud. Starting at ~\$3, Hetzner Cloud is a great VPS solution that is cheap, and reliable.

See multiple tools on Hetzner platform that can make your life easier.
Pros -

  • Reliable
  • Inexpensive
  • Support for Terraform & Ansible (not an active user)

Cons -

  • Extremely limited data centre locations - not a problem if you are targeting Europe
  • Be aware that very cheap costs = cheaper hardware. Hetzner Cloud is good, but there is no dark magic involved to make anything cheaper than what it is

I understand that Contabo is a comparable solution to Hetzner Cloud, but I have not used that as much to comment.

Alternatives

I had seriously considered switching back to Laravel just for the ease of deployment and the ability to use cheaper hardware.

I am still going back and forth on that in darker corners of my mind, but Node (and frameworks like NestJS, AdonisJS, PostGraphile etc.) has this ability to ensnare you and not allowing you to go anywhere else.

Laravel

If you are using Laravel and trying to bring up gently-used applications, consider shared hosting. They are easier to manage (see VPS considerations above) and someone else does all the work required to maintain servers. You can access your infrastructure through CPANEL, create databases and setup your application with few clicks, and in general, do as less work as possible.

But, in return, you also lose flexibility and power. You may not get as much RAM / CPU that you need, your hardware may fail you since someone else on the same infrastructure decides to establish a new record in expanding known fraction numbers of Pi.

Shared hosting has been a hit or miss for me. From my own experience and that of other kind souls sharing valuable information on Internet, I believe one of the following can be a good choice.

Wordpress

If you are using Wordpress (in whole[really?], or as back-end), I still think shared hosting is a better option unless you have a decent sized application.

Static sites

Choose GitHub or Netlify for hosting static sites. Move up the tiers as you build traffic or size of your application - it does not make sense for anything else.

This blog is a static site and is hosted on Netlify.

Conclusion

Use Node on Digital Ocean

:)

* Affiliate links that earn me a few bucks if you choose to buy by clicking on the links. That has in no way altered what how I have written / discussed about the said products or services.

comments powered by Disqus