Technology has come a long way, from mainframes used by corporations in the sixties to mobile phones and smart watches. The purpose of this writing is to compare forms of hosting and help your engineering team decide based on your specific requirements. The internet saw the development of web applications such as servers and websites, that enabled information and communication to flow online. For users/clients to access these applications, the server (machine running the application) needed to be constantly turned on and connected to the internet.
Before cloud computing and virtual servers, there were workstations. These were literally a physical CPU with installed firmware and source code running beneath someone’s desk. There was always a risk of disconnection in the event of power or network failure. Aside from taking up physical space, they required a capital investment, were challenging to scale and incurred overhead management costs. Their inflexibility led to the development of cloud based solutions.
One of the most popular cloud providers is Amazon Web Services (AWS) - powering nearly half of the present day internet. Other notable companies include Microsoft Azure, IBM, Digital Ocean and more. They provide a suite of hosting options ranging from Docker containers to full-blown Linux instances. A common route that many startups tend to take is using instances. These are referred to as EC2 (Electronic Cloud Compute) on AWS and ‘Droplets’ on Digital Ocean. While they are great as they provide infinite resources, they present several drawbacks which are time consuming and can be avoided. A droplet is basically a computer (or part of a computer) constantly running and can be accessed from anywhere. The developer will need to install a web server (Apache or Nginx), do the initial configuration and make everything ready from scratch. They’ll also need to conduct regular updates and maintenance. That may not be a lot of work for a starting company, if you have the time; but as you grow and get more traffic, it may cause problems.
The beauty of serverless is in its abstraction. The developer only needs to worry about the code. Once deployed, you are only billed for the hours your function ran. Let me explain; an EC2 instance or a droplet is always on, regardless whether a request is being processed or not. You are usually directly billed for this ‘uptime’. With serverless, your application is placed as a function, triggered by an API gateway. Whenever a client makes a request, it is booted, executes the request, then turned off. You only pay for the time your requests consumed. This model works best in event-based systems, where a request represents an action such as User Signup or Payment. E-commerce platforms, payment gateways, recipe apps are notable examples. Serverless also supports micro-service architecture - a common approach used in Enterprise Grade software development, which involves having separate servers for fairly unrelated tasks. This eliminates a central point of failure and makes it easier to maintain and upgrade the code base. Tools are available for most common languages supporting multiple frameworks.
“If you can just avoid dying, you get rich.” - Paul Graham, YC.
For your startup to survive, you need to be hard to kill. One of the most common causes of death is running out of money. Frugality is essential for successful founders, ensuring your team is working as cheaply as possible while delivering high-quality output.