Skip to content

Update single-runtime-image.md #4580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Kemi-Elizabeth
Copy link
Collaborator

Why

Closes #4504

What's changed

Added section to single runtime image page.

Where are changes

Updates are for:

  • platform (sites/platform templates)
  • upsun (sites/upsun templates)

adjusted bulelt point
gilzow and others added 5 commits May 5, 2025 08:59
added new page with new mounts section and combined sections too
removed new page and added new mounts content to composable and single runtime image pages again
updated platform docs with new mounts content
Copy link
Contributor

@ralt ralt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the text is correctly explaining the spirit of the mounts! Very happy to see this. I left a few comments that you could almost describe as nitpicky. Feel free to ignore.

The `storage` mount is a shared network storage that is automatically added by the platform. It is required for applications that need to share files across multiple instances—such as user-uploaded media or shared assets. You can configure the size of this mount via the {{% vendor/name %}} UI.

Pros:
- Shared across all app and worker instances.
Copy link
Contributor

@ralt ralt May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The worker instances do not get to share the same mount as the app instances for this kind of storage. You need to use the service mounts for that. The purpose is really just for horizontally-scaled applications to use the same files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have removed the mention of 'worker' in this pro line!

- Persistent across restarts and redeployments.

Cons:
- Lower performance due to network-based access.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the instance storage is also a network-based volume 😅

The storage mount is an NFS volume and not a "block storage" kind of mount, so it has a lot more synchronization overhead. Not sure how to express that in this doc without getting too much into details though...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed this con point altogether as it seems a bit more complex than the reader would need.


#### Scaling

When horizontally scaling your app (multiple instances of the same app), using the appropriate mount type is critical. For shared data, a `storage` or `service` mount is recommended. For local-only data, use `instance` or `tmp` mounts.
Copy link
Contributor

@ralt ralt May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit weird to mention instance mounts here given that they're not previously defined on this document.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed mention of instance here! Thank you for spotting!

@gilzow
Copy link
Collaborator

gilzow commented May 30, 2025

@ralt I'm confused here... my original understanding was that storage mounts are automatically created and can only be shared across instances of the same app. But with this new info, that’s not true. they can be shared across different apps. So then, how is it different from a service mount?

Unlike the default storage mount, which is automatically provisioned per app, a service-based mount gives you greater flexibility and control over how shared storage is configured and accessed across your project.

But we don't then further define on the dedicated page for service mounts how they give you more control or flexibility over storage. Adding to the confusion, for service mounts we then say

This is useful when multiple apps or services need access to the same set of files or data—for example, a frontend app and a background worker both reading from a shared media directory.

But then later in the mounts area, we use storage mounts as the mount type for sharing data between multiple apps.

Back on the dedicated page for the Network storage mount type, the first example we go through is again sharing mounts between different applications (though we mention you can also use storage type mounts).

So, how do these two types of mounts differ? After reading through all of this, I'm going to infer the only difference is that the storage mount type can't share data between different applications and different workers (and https://docs.upsun.com/add-services/network-storage.html#how-do-i-give-my-workers-access-to-my-main-applications-files seems to support this assumption)? If this is correct, I think we need to clearly lay out that difference in the description of both mount types.

@gilzow
Copy link
Collaborator

gilzow commented May 30, 2025

Given the amount of information now concerning mounts, I wonder if it we should consider moving all of this information to a dedicated page for mounts, and link to it from the app-reference page(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve mounts documentation - add pros and cons for different types of mounts
4 participants