Documentation – Kinsta® https://kinsta.com Fast, secure, premium hosting solutions Mon, 31 Jul 2023 19:57:59 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.3 https://kinsta.com/wp-content/uploads/2023/03/cropped-favicon-32x32.png Documentation – Kinsta® https://kinsta.com 32 32 Static Site Hosting Infrastructure https://kinsta.com/docs/static-site-infrastructure/ Tue, 25 Jul 2023 18:27:28 +0000 https://kinsta.com/?p=160130&post_type=help&preview_id=160130 When you host your static site with Kinsta, your site is pushed to Cloudflare’s Content Delivery Network (CDN) with locations. A Content Delivery Network (CDN) is ...

The post Static Site Hosting Infrastructure appeared first on Kinsta®.

]]>
When you host your static site with Kinsta, your site is pushed to Cloudflare’s Content Delivery Network (CDN) with 260+ locations. A Content Delivery Network (CDN) is a geographically distributed network of servers that work together to deliver website content and other digital assets to users. CDNs are designed to improve content delivery’s performance, reliability, and scalability by reducing latency and optimizing data transfer.

Visitors to your site are served from the closest, fastest, and easiest-to-access CDN location, so data processing can occur much closer to the end users. In this guide, we’ll dive a little into the details of our Static Site Hosting infrastructure.

A diagram of Kinsta’s Static Site Hosting infrastructure.
A diagram of Kinsta’s Static Site Hosting infrastructure.

Deployment

Git Repository

Your static site’s code is stored within a Git repository. You can choose from any (or all) of the following:

MyKinsta Add/Deploy Static Site

In MyKinsta, when you add a static site, it connects to the Git repository to retrieve the site.

MyKinsta Bot

With Automatic deployment on commit enabled in your static site’s settings, if you commit a change or merge to your repository, the MyKinsta bot detects this, then pulls the site from your Git service provider and deploys the updated version of the site.

Kubernetes Pod

Kinsta communicates with the build service, which creates a Kubernetes Pod. Each pod is a standalone isolated environment for each and every deployment. The Kubernetes pod builds the site and pushes the content to the Cloudflare R2 storage.

Requests

Cloudflare R2 Storage

Cloudflare R2 Storage is a bucket system that holds all of the files that make up your site. Cloudflare then distributes copies or cached versions of the site to the edge servers within the CDN’s 260+ locations.

Cloudflare’s Globally Distributed Network (CDN)

Cloudflare’s CDN consists of numerous edge servers strategically located in various geographic locations close to end users. When a user requests content from your site, the CDN’s edge server closest to the user receives the request. If the requested content is already cached on that edge server, it can deliver it directly to the user without needing access to the origin server.

If the requested content is unavailable on the edge server, the CDN retrieves it from R2 Storage, where the content is stored. The CDN then caches the content on the edge server for subsequent requests, optimizing the delivery process.

The CDN employs load-balancing techniques to distribute incoming traffic across multiple edge servers. This ensures that the load is evenly distributed, reducing the risk of server overload and improving overall performance. Content delivery is further optimized by implementing techniques like intelligent routing, which delivers content to the end user based on factors such as:

  • User location
  • Network conditions
  • Server load and capacity
  • Content availability

This smart routing sends content requests to the most optimal edge server within the CDN to deliver your static site efficiently.

The post Static Site Hosting Infrastructure appeared first on Kinsta®.

]]>
Application Troubleshooting Guide https://kinsta.com/docs/application-troubleshooting-guide/ Fri, 30 Jun 2023 19:47:47 +0000 https://kinsta.com/?p=158158&post_type=help&preview_id=158158 If you have an issue with your application, the first place to check is Application Troubleshooting to see if the specific error is listed. If you ...

The post Application Troubleshooting Guide appeared first on Kinsta®.

]]>
If you have an issue with your application, the first place to check is Application Troubleshooting to see if the specific error is listed. If you don’t see an error message there, consider and try to rule out the following:

  • Connectivity issues with external applications.
  • Bad Start commands. For example, if you are trying to use yarn when only npm is available, or a package.json file without the required start script.
  • When chaining Start commands, the last command must initiate a web service. This keeps the container running and listening to incoming connections.
  • An invalid package name in package.json. For example, do not use “js” or “node” in the name. For more details, see the specifics of npm’s package.json handling in the npm Docs.
  • Permission issues.
  • Missing files.

General Troubleshooting Steps

  1. If your application is created with a Dockerfile, make sure Bash is installed in the container. Usually, the base image (e.g. Ubuntu) includes a shell package and will work by default. The shell package may not be included in some more streamlined containers, and you’ll need to add it. The base image determines how to add the shell package:
    • Alpine: apk add bash
    • Ubuntu/Debian: apt install bash
    • Fedora: dnf install bash
  1. Change the start command to sleep 9999. This will get the pod into a running state where you can interact with it via the Web terminal. Edit the web process to change the start command (Processes > Runtime processes > Web process > Edit process).
  2. Open the Web terminal.
  3. Check the environment variables. In the web terminal, enter printenv and check that the environment variables are what you expect them to be.
  4. Run the application manually. Try running the application manually with debug options enabled. The command to do this may vary, depending on the application. For more details, check the documentation for the language or package manager your application is built with.

Related Documentation

The post Application Troubleshooting Guide appeared first on Kinsta®.

]]>
App Quick Start https://kinsta.com/docs/app-quick-start/ Thu, 25 Aug 2022 15:52:12 +0000 https://kinsta.com/?post_type=help&p=131047 To help get you started and provide examples of minimal applications, we’ve created several Hello World repositories in GitHub that you can fork and deploy on ...

The post App Quick Start appeared first on Kinsta®.

]]>
To help get you started and provide examples of minimal applications, we’ve created several Hello World repositories in GitHub that you can fork and deploy on Kinsta.

If you’re using a different Git provider like Bitbucket or GitLab, check out our guides for importing a GitHub repository into either git service:

Go

Java

Node.js

PHP

Python

React

Ruby

Scala

Other

Static Site Hosting Examples

With Kinsta’s Static Site Hosting, you can deploy static sites composed of non-dynamic files such as HTML, CSS, and JavaScript. Your repository can contain the pre-built files or the source code to generate your static site.

For examples of how to deploy a site on our Static Site Hosting services from GitHub, check out these template repositories you can use to create a new repository and deploy on Kinsta:

Other Static Site Examples

The following quick start guides use static site generators that are better suited for our Application Hosting because they use something other than Node.js to generate the static site:

The post App Quick Start appeared first on Kinsta®.

]]>