Why use CDN Based Cloud Hosting Services?

Subraya Pai
Geek Culture
Published in
5 min readAug 3, 2021

Web hosting services are there from decades. With development in the cutting edge cloud technologies a lot of service providers have come up with hosting services with advanced features which are boon to the developers/DevOps people.

Photo by Max Duzij on Unsplash

tl;dr

Content Delivery Network(CDN) based Cloud hosting services are of great help in resolving most of challenges faced in initial deployment and Continuous Integration/Continuous Deployment(CI/CD) of web application (at least the client side static code) along with features like Pull Request Preview, security and monitoring resources. They mainly expose client side code in serverless mode by deploying them to the CDN in the cloud.

Note: This is my personal opinion as I have observed in my usecase.

Use Case:

After I completed development of my ReactJS based web application locally, I needed to Deploy it to staging/production environment with easy CI/CD. [You can consider any static websites for this use case as well.]

Usual Challenges faced in this use case are:

  1. Where to deploy? Is it Bare Metal/Virtual Machine/Container/Kubernetes/cloud storage…? The default options for deployment infrastructure can vary depending on the type of application, scalability needed, security and maintenance. You have to trade off between these with other parameters like cost, resources and time.
  2. How to deploy? As a container image/package/simple git clone…? The way to deploy may vary depending on your requirement from a simple git clone to building container images and deploying them in required platform/Container/Kubernetes. CI/CD pipeline features can be of help here for automation.
  3. Which Proxy to use for handling SSL certificate? Self hosted proxy server on VM/Cloud Load Balancer/…? Either we have to maintain our own proxy server on a machine/VM or use Managed Load Balancer service provided by cloud providers, even there we have to manage some configurations.
  4. How to Manage Domain ? For this either we point the application to the main domain or subdomain. However, we will have to manage the configuration in the place where domain settings are done (domain provider’s web application like GoDaddy/Google Cloud DNS/AWS Route 53…etc).
  5. How to get SSL certificate and manage? This is another task where you have to either manually execute/set up cron with some commands if using self hosted proxy OR configure it on Cloud Load balancer if using the any cloud managed load balancer.
  6. How to review changes before Continuous Integration(CI) to the application ? Do we deploy the git branch code/container image to some environment for review purpose?

Fortunately Cloud Hosting Services provided by some vendors are of great help by reducing all the above efforts to less than an hour for the initial deployment. There are multiple service providers in this area.

I had used AWS Amplify Console for my use case [2]. But most of the other providers also have these features.

Lets see how AWS Amplify Console handled all of the above challenges with minimum action needed from me,

  1. Where to deploy? AWS Amplify hosts the code in AWS Content Delivery Network(CDN), AWS’s global scaled network for faster content delivery. Action needed: None.
  2. How to deploy? It has its own pipeline configuration which either can be maintained in Amplify Console or in the code repo. With this configuration file, AWS Amplify will know where the final build output resides, so that the same is deployed in AWS CDN. Action needed: Connect the git repo from Amplify console and configure the CI/CD pipeline configuration file amplify.yml on Amplify Console or your code repo root folder [2].
  3. Which Proxy to use? There is no proxy needed to be set as the domain management in the console has its own SSL configuration. Action needed: None.
  4. How to Manage Domain ? As said in previous point, there is a section to manage domain to point to the application. Either you configure domain or subdomain and update minimal configurations in domain registrar’s settings. Action needed: very few domain setting and configurations [3].
  5. How to get SSL certificate ? After a domain verification done, SSL certificate gets generated automatically. The Certificates are renewed automatically. Action needed: None.
  6. How to review changes before Continuous Integration(CI) to the application ? When a new pull request created from a feature branch, the changes in the branch gets deployed and a separate URL gets created with SSL. This URL can be used to review the changes in the branch before merging the pull request. Action needed: Enable Pull Request Preview feature on console and create a pull request from a branch after the required changes are committed[4].

+There are some other useful features as well.

  • Password Protection for URL: Credentials can be set to access the URLs of the deployed applications.
  • Backend Deployment Handling: The Console also allows for handing backend development and content management.
  • Monitoring: Hosting related metrics can be monitored for your applications in near real-time and also alarms can be created to send notifications when a metric exceeds a threshold you set.
  • Free tier: AWS gives some free tier resource limits for using these features. They are good enough for getting started free of cost or use as staging environment.

Reference links about AWS Amplify Console w.r.t. above use case:

Summary of advantages,

  1. Faster content delivery with the help of cloud CDN.
  2. Easy CI/CD operations with pipeline configuration.
  3. Built in SSL certificate management.
  4. Easy custom domain configuration.
  5. Easy review of changes using PR Preview feature.
  6. Resource Monitoring.
  7. Pay only for the resources used above free tier limits.

Note: These advantages are within the scope of the above use case. There may be added advantages if the scope increases. Eg: Along with ReactJS front end if you need to develop and manage backend REST/GraphQL API.

Other providers:

Below is list of other platforms which provide similar service,

Thank you for reading. I hope this article has given some insights on advantages of cloud hosting services.

You can find top 5 CDN based cloud hosting services in the article link below,

References:

  1. https://www.ibm.com/cloud/learn/what-is-cloud-hosting
  2. Deployment of ReactJS application using Amplify Console
  3. Custom domain configuration in Amplify Console (Note: Here in the video they have used Route 53 as domain registrar. It works with any domain registrar after domain ownership verification.)
  4. Pull Request Preview using Amplify Console

--

--