First, let's introduce a few concepts about cloud computing:
-
Infrastructure as a Service (IaaS):
Examples include Alibaba Cloud and AWS. They provide various computing resources to companies, including servers, DNS, networks, storage, and data center space. The most commonly used is VPS. -
Platform as a Service (PaaS):
It provides the infrastructure (such as operating systems, databases, servers, etc.) and application frameworks needed for application development and deployment. Users can quickly build and deploy applications based on cloud computing platforms without the need for maintenance and management of underlying infrastructure. For example, you can upload code and it will provide the necessary environment and runtime, which is also the main battlefield for K8S. -
Software as a Service (SaaS):
It is a software application service model provided on a cloud computing platform. Customers can use cloud-based software applications through the internet or a browser without the need to purchase, deploy, and maintain hardware servers and software systems. It is the most widely used type of cloud-based application, such as the online features of Office 365 and Slack.
This article collects some popular PaaS platforms that support a wide range of languages, with Node and Dockerfile being the most commonly used. The main usage pattern is to associate code repositories like GitHub and automatically deploy them. With repository updates, the services are automatically redeployed, which can be considered as a form of CI/CD.
Github Pages#
This is the most widely used platform, but it has limited capabilities. It is a static website hosting platform and belongs to the serverless architecture. It is more suitable for simple page demonstrations, reminding me of the time I played around with Hexo.
Vercel#
Based on my observation, this method is very popular for deploying demos or documentation in frontend projects, and it is indeed convenient. It is a static website hosting service and can also be considered as a PaaS. However, because it is serverless, its capabilities are limited, but definitely more than what Github Pages can do, and it is also cheaper. The free plan provides 100 GB-hours of free usage time, which is sufficient for most small websites. Compared to Netlify, it offers more free quotas, faster build speeds, and lower prices, which is why it has become mainstream.
When binding a custom domain, it is said that pointing the domain CNAME to
http://cname-china.vercel-dns.com
can bypass the GFW (Great Firewall of China).
Netlify#
It is also a popular deployment platform for frontend projects. The free plan provides 125k free calls. It is similar to Vercel in terms of core functionality, but the "cost-effectiveness" is not as good as Vercel. From my observation, many people have switched to Vercel.
Regarding the above two platforms, I want to mention their main feature: serverless functions.
Serverless functions, also known as Function as a Service (FaaS), are a new type of cloud computing service. They are built on top of serverless architectures provided by cloud service providers. Users do not need to worry about server configuration, management, scaling, etc. They only need to write and upload code to enjoy the automated elastic resource allocation, load balancing, and automatic scaling provided by the cloud service provider. It enables on-demand billing and efficient development and deployment. In essence, it is a computing model, often referred to as Serverless architecture. WeChat Mini Program's cloud development is also a form of Serverless invocation.
Railway#
It is a PaaS platform for rapid deployment of programs or services. The free plan is attractive, but it currently has a limit of 500 hours per month without credit card verification, which means it can only run for 24 days in a month. One drawback is that the database may be reset after redeployment, so it is more suitable for demonstration and stateless services. If you plan to pay for it, the price is also reasonable.
fly.io#
fly.io is a containerized deployment platform that allows you to deploy code to fly.io servers with just a Dockerfile. It provides a certain amount of free usage quota. Their goal is to allow small applications to run for free and only pay a reasonable fee when scaling is needed.
Free quota:
- Up to 3 shared-cpu-1x 256mb VMs
- 3GB persistent volume storage (total)
- 160GB outbound data transfer
To unlock higher free limits, you need to add a credit card, and any usage beyond the limit will be charged at the end of the month. Deployment may require the use of the provided CLI tool: flyctl (an online version of the CLI is also available).
Heroku#
One of the earliest PaaS platforms, it started development in 2007, so it is very mature and has a well-established ecosystem, more powerful scalability, and many out-of-the-box features. However, it is expensive and not as fast as the emerging fly.io. It is not very friendly for accessing from within China, but it is very popular outside of China.
Currently, it is not a good choice if you want to use it for free.
Others#
When it first emerged, many people used Google's GAE because it was free and could be directly deployed for bypassing internet censorship. It was probably the first tool I used for bypassing internet censorship, and I used it for a long time. The speed was good at first, but unfortunately, as a young internet user, I was just following online tutorials and experimenting randomly.
In China, Sina's SAE was also popular for a while but is now in a semi-abandoned state.
In China, the main options are Alibaba Cloud, Tencent Cloud, and considering cost-effectiveness, Huawei Cloud and Baidu Cloud.