R Shinyapps高级设置

《R Shinyapps高级设置》

以下是shinyapps.io设置的屏幕截图.有人可以解释这些东西是什么以及它们之间的关系如何?设置区域中有一个有限的线性定义,而发光服务器admin guide则没有解释.

>首先,什么是实例,工作者和流程?
>三种不同的超时之间有什么区别:
‘实例空闲超时’,’连接超时’和’空闲超时’?
>这与可用内核的数量有何关系?我怎么知道有多少核心可用?
>我的应用程序是否使用多个核心?
>我是否必须明确地使用多核程序或确实如此
闪亮自动分配任务?

最佳答案 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.

…并部分解决应用程序的闪亮工作方式:

  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上单独提出具体问题,因为它们更有可能以这种方式回答.

点赞