why my shinyapps.io still use the same instance for different users. I see there are 5 applications for Free acount.

I deployed my R Shiny code to shinyapps.io. When I entered parameters on one computer and then accessed the app from other computers, they all showed the same parameters. While I expected shinyapps.io to create separate instances for each user, this doesn't seem to be the case. Can you explain why everyone sees the same parameters, regardless of the device used? Currently, I used the free version of shinyappio.

I asked the ChatGPT, it is the answer. Bassd on the option 2, If I upgrade to Shiny Server Pro, the shinyappio will create multiple instances for different users. I want to confirm this answer is correct. It means that I do not need to change the code, and upgrade will solve this problem.

ChatGPT answer:

  • Shared Instance: By default, Shiny apps on shinyapps.io often use a single instance for all users, meaning they share the same app state and data. This explains why parameters entered on one computer appear on others.
  • Reasons for Shared Instance:
    • Promotes resource efficiency and scalability.
    • Simplifies app management for general use cases.

Resolving the Issue:

1. User-Specific Data Storage:

  • Reactive Values: Employ reactiveValues to store user-specific data separately within each session. This ensures each user's parameters remain independent.
  • Example: `Code snippetuserValues <- reactiveValues(parameters = NULL)

observeEvent(input$submitButton, {
userValues$parameters <- input$parameters
})`

2. Multiple Instances (if necessary):

Shiny Server Pro: Upgrade to Shiny Server Pro for the ability to create multiple instances of your app. This allows each user to have a completely isolated experience.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.