Skip to content
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

Add cache for the Swift AppFS #4178

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Add cache for the Swift AppFS #4178

merged 1 commit into from
Oct 23, 2023

Conversation

nono
Copy link
Member

@nono nono commented Oct 19, 2023

When loading html, js, css, and images for a webapp or a konnector, the stack makes a call to the AppFS server. With many users and a Swift cluster, we can improve latency by using a cache.

When loading html, js, css, and images for a webapp or a konnector, the
stack makes a call to the AppFS server. With many users and a Swift
cluster, we can improve latency by using a cache.
@nono nono requested a review from a team as a code owner October 19, 2023 15:55
// NewSwiftFileServer returns provides the apps.FileServer implementation
// using the swift backend as file server.
func NewSwiftFileServer(conn *swift.Connection, appsType consts.AppType) FileServer {
initCacheOnce.Do(func() {
c, err := lru.New[string, cacheEntry](128)
Copy link
Member

Choose a reason for hiding this comment

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

Why such a small cache? Don't we have more konnectors and applications already?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it can take a lot of RAM. I prefer to start small and see later to increase.

@nono nono merged commit 11caccf into master Oct 23, 2023
6 checks passed
@nono nono deleted the appsfs-cache branch October 23, 2023 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants