Limitations of shinyloadtest
2018-09-05
Source:vignettes/limitations-of-shinyloadtest.Rmd
limitations-of-shinyloadtest.Rmdshinyloadtest is designed to work with a wide variety of
application types and deployments, but there are certain types of
application and deployment configurations that it is known not to
support.
Deployment limitations
-
WebSockets are required: On Posit Connect and Shiny
Server, SockJS is
used instead of plain WebSockets in order to support browsers and load
balancers that don’t support WebSockets. Even though Shiny works in the
absence of WebSocket support,
shinyloadtestdoes not. - shinyapps.io unsupported: Applications deployed on http://www.shinyapps.io/ can’t be recorded or load tested.
-
Recordings are server-dependent: Recordings made
with a particular server type — Connect, Shiny Server, local — may only
be played back by
shinycannonagainst an application deployed using that same type of server. So, for example, a recording made of an application running on Connect will not work correctly if it’s run withshinycannonon the same target application deployed using a different server like Shiny Server Pro.
Application limitations
-
Apps must be deterministic: The recording file made
by
record_sessioncontains messages from the server in the order they were received. If messages are received in a different order byshinycannonwhen it’s playing the recording back, that session will be considered a failure. If the same change in inputs does not always lead to outputs being updated in the same order, shinyloadtest will not work.- Apps with high latency — either because they are geographically
distant from you, or because they perform long-running computations —
are likelier to exhibit non-determinism. High latency can cause messages
sent from the browser and received from the server to be likelier to
interleave in different ways, which can cause
shinycannonto fail. The telltale sign of such a problem is a message likeWS_RECV line 66: Haven't received message after 30 secondsinshinycannonoutput. - One way to mitigate the effect of high latency is to take more time
between interacting with inputs when you’re making your recording. The
longer the amount of time between messages your browser sends, the less
likely it is that messages received from the server will interleave with
them in a different way in the future, when
shinycannonis replaying them. - In testing, we’ve observed intermittent problems with the
selectize()input, particularly whenserver = TRUE. More information can be found at https://github.com/rstudio/shinyloadtest/issues/121
- Apps with high latency — either because they are geographically
distant from you, or because they perform long-running computations —
are likelier to exhibit non-determinism. High latency can cause messages
sent from the browser and received from the server to be likelier to
interleave in different ways, which can cause
-
R Markdown documents with
runtime: shinyunsupported: R Markdown documents that embed Shiny applications are currently unsupported.