DEV Community

Cover image for How to deploy your web application? 3 different approaches to consider (+1 bonus)
Lukas Mauser
Lukas Mauser Subscriber

Posted on

How to deploy your web application? 3 different approaches to consider (+1 bonus)

Deploying web applications is complicated nowadays. There are usually multiple routes you can choose. So let's look at the landscape, compare some providers and try to find the right choice for your project.

Virtual Private Servers (VPS)

There aren't many moving parts here. It's just a single computer, serving your files and executing your scripts.

Architecturally speaking, hosting on a virtual private server is the simplest possible setup and therefor also the cheapest, when it comes to bang for your buck.

Prices usually start from around $5 per month. If you are looking for a provider, I recommend you check out this list, of cheap VPS providers.

A virtual private server is not only a cost effective and powerful but also very flexible option, since you can pretty much deploy anything you want. With tools like Docker it even becomes possible to deploy multiple applications on a single server, including databases, frontends, backends and whatever you can think of, saving you some money on smaller projects.

However, even though it's the simplest setup under the hood, it does not mean it's the simplest way to get started. It usually requires you to learn about self hosting and you need to put in some time to maintain your machines.

At Sliplane, we try to make hosting on a VPS ridiculously easy. You can play around for free for 2 days.

Simple Cloud

I will use the term simple cloud here, to refer to PaaS providers, that do not require you to know much about infrastructure. Their priority is making deployments easy. It's a trade off between being able to quickly deploy applications, and limited options to fine tuning.

Providers include Digital Ocean, Heroku or Render for example.

Under the hood it's usually a VPS + load balancer combination. This setup enables you to scale vertically (making the server bigger) and horizontally (adding more servers) without downtime.

Since the setup is more complicated, this option is more expensive per computing power that you get compared to renting a plain VPS.

Big Cloud

Big cloud means being able to handle big traffic and big server bills. The big three main players in the game are Amazon Web Services, Google Cloud Platform and Microsoft Azure.

They offer a multitude of services around deploying web applications. The focus shifts from simplicity to scalability. They are not super intuitive to use but once you figured everything out you are ready to handle virtually unlimited traffic.

How do they do it? Autoscaling is the keyword here. The setup is a VPS + load balancer + orchestrator combination. An orchestrator is software like Kubernetes for example, that automatically takes care about spinning up servers and instances of your application on demand. If the traffic is growing, it adds servers and vice versa.

But you guessed it, more complexity means higher cost. Even though these big players can afford to offer free entry plans, you can expect a steep increase in prices once you reached the free tier limit.

+1 Bonus: Content Delivery Networks

A Content Delivery Network (CDN) is a distributed network of servers, which is optimized for serving static content. Everything you upload automatically gets replicated across the network resulting in fast loading times for your users across the globe.

This is arguably the best option for deploying globally available static websites.

Side note: In the beginning the term static website often confused me. Static does not mean, your website is not interactive. Single page applications are static sites too, even though there might be a lot of dynamics happening. The difference is, there is no code running on the server. Once you add server side rendering to site, it becomes a dynamic website, since the server needs to do some computational work.

Apart from the big three (AWS, GCP and Azure), popular providers are Cloudflare, Akami and Fastly. Some offer generous free tiers to deploy your static website.

Summary:

  • VPS: Cheapest, most flexible solution and with Docker + Sliplane very manageable
  • Simple cloud: Simple to get started with medium scalability in mind
  • Big cloud: More complex but virtually unlimited scalability
  • CDN: Go to choice for deploying scalable static sites

Top comments (4)

Collapse
 
code42cate profile image
Jonas Scholz

im hosting all my apps on the blockchain

Collapse
 
wimadev profile image
Lukas Mauser

I forgot, if you can, this is the go to option 😜

Collapse
 
thecodingthesi profile image
Thesi

What about github pages?

Collapse
 
wimadev profile image
Lukas Mauser

Good option for simple and free static site 👍