This persistent storage complements the ability to connect applications to persistent content in databases and third-party file stores. As the name implies, the data saved to persistent storage lives on across builds and deployments of the applications themselves.
This kind of storage could be essential to applications that accumulate disk-stored data as they run.
By way of example, Evelin Szabados, Tech Lead for the team of developers behind Kinsta’s Application Hosting platform, says: “Imagine a sale tax calculating function that creates data maintained and shared within an application, or a machine learning application with large datasets that need to be stored and accessed by multiple processes simultaneously.”
Persistent Storage and Containerized Applications
Szabados says that an ephemeral existence for both code and data is the default behavior for applications in a containerized environment like that used at Kinsta.
“One of the key attributes of containerized application deployments is that the containers created during deployments get destroyed and re-created on each subsequent deployment,” she says. “This means data generated by the application also get destroyed.”
Szabados says Kinsta uses the container orchestration platform Kubernetes, which offers persistent volumes (PVs) as an alternative to ephemeral storage.
“PVs can be attached to the application’s pods — the smallest deployable units in Kubernetes,” she says. “Pods are basically equal to the processes defined by Application Hosting customers.”
As Szabados explains: “Each process represents a pod, and each can have its own persistent storage.”
Adding Persistent Storage to Your Application
Application Hosting customers manage persistent storage through the same MyKinsta dashboard used to create, edit, and monitor applications.
When creating a new application within MyKinsta, the Resources tab now includes a Disk option for web service and background worker processes. (Disks are not available for the cron job process type.)
An application will have just one web service process, but you can create multiple background worker processes and optionally add disk space to any of them.
Each “disk” represents a Kubernetes persistent volume.
Within the Resources tab, Click on Disk to expand its dialog:
Within the Disk dialog, you can specify a mount path for your new disk:
You can choose a mount path that suits your application’s configuration, except for the following:
After entering the mount path, select the storage space your app requires:
Note: You can increase the size of a disk at any time, but you can’t reduce its size. (To deploy the same project with less disk space, create a new application with your preferred specifications.)
Editing Your Application’s Disk Settings
To change storage settings, navigate to Applications to find your application in MyKinsta and click Disks in the left-hand menu. Now click the pencil icon under Actions:
Below, we are changing the disk’s mount path (formerly
After clicking the Finish editing button, we can use the Kinsta Web Terminal to confirm that the change to the mount path happens immediately:
We’ll Keep Your Persistent Data Safe
Kinsta generates daily backups for persistent data, keeping each backup for 7 days. Our Support team can restore a backup on request.
Remember that restoring a backup will overwrite content currently in persistent storage. And deleting the application itself will eliminate all of its backups.
Deploy Your Application With Persistent Storage Today
Do you have an idea for an application that could use persistent storage? Here’s how you can get up to speed quickly with Kinsta’s Application Hosting platform:
- Browse our growing library of quick-start examples to see how to deploy your favorite technologies from Git hosts like GitHub, GitLab, and Bitbucket.
- Review our official Persistent Storage documentation.
- Create your MyKinsta account and start building risk-free!
That’s a powerful home for your application and its data.