gpt4 book ai didi

R Shinyapps 高级设置

转载 作者:行者123 更新时间:2023-12-01 04:59:14 24 4
gpt4 key购买 nike

enter image description here

这是 Shinyapps.io 设置的屏幕截图。有人可以解释一下这些东西是什么以及它们之间的关系吗?在设置区域和 Shiny 的服务器中只有一个有限的 liner 定义 admin guide这并没有解释太多。

  • 首先,什么是实例、工作线程和进程?
  • 三种不同的超时有什么区别:
    “实例空闲超时”、“连接超时”和“空闲超时”?
  • 这与可用内核的数量有什么关系?我怎么知道有多少内核可用?
  • 如果可用,我的应用程序是否使用多个内核?
  • 我是否必须明确地对多核的使用进行编程或做
    Shiny 自动分配任务?
  • 最佳答案

    Shiny 对概念有很好的概述 here .部分解决设置的作用:

    Tuning parameters

    The architecture described above uses two load factors to fine tune the performance of your applications.

    Worker Load Factor – The threshold percentage after which a new browser connection will trigger the addition of a new worker.

    Instance Load Factor – The threshold percentage after which a new connection will trigger the addition of a new Application Instance (limited to the maximum instance limit, free tier is 1)

    Each load factor is based on the idea of a threshold percentage, which is the percentage of available connections or processes that are allowed to open before shinyapps.io launches another worker or Application Instance. Both settings are configurable in the Advanced tab within the Settings page for a given application.


    ...部分解决了 Shiny 的应用程序的工作原理:
    1. Publisher creates a new application and deploys it to shinyapps.io at https://{someaccount}.shinyapps.io/{appname}
    2. A request from an end user triggers the start of an Application Instance
    3. Application Instance will start with at least one worker
    4. The number of connections to the worker increases as additional end users visit the application. When the Worker Load Factor threshold is exceeded, shinyapps.io adds another worker, so long as the max number of workers per Application Instance has not been reached. New connections are now assigned to the new worker.
    5. New workers are added when needed as new users continue to visit the application. When the Instance Load factor is exceeded, shinyapps.io will trigger the addition of another Application Instance, so long as the max number of Application Instances has not been reached (the max number may be one).
    6. Shinyapps.io closes connections as end users close their browsers or are idle for longer than the Idle Timeout.
    7. Shinyapps.io shuts down each worker once it has no further connections open.
    8. Shinyapps.io turns off each Application Instance once it has no running workers, or once its workers are idle for longer than the Instance Idle Timeout. This threshold timeout should be increased if you would like to avoid restarting the application. Note: Increasing the timeout will use up more active hours.
    9. A new request from an end user causes shinyapps.io to turn on an Application Instance, and stages 2-9 repeat.

    从这些中,您可以拼凑出您需要的东西。除此之外,我建议在 StackOverflow 上单独询问特定问题,因为它们更有可能以这种方式得到回答。

    关于R Shinyapps 高级设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34400498/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com