{"id":13707911,"url":"https://github.com/rstudio/shinyloadtest","last_synced_at":"2026-01-25T09:34:52.377Z","repository":{"id":17578958,"uuid":"81914457","full_name":"rstudio/shinyloadtest","owner":"rstudio","description":"Tools for load testing Shiny applications","archived":false,"fork":false,"pushed_at":"2024-08-21T18:52:18.000Z","size":93319,"stargazers_count":112,"open_issues_count":32,"forks_count":22,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-01-19T12:36:35.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rstudio.github.io/shinyloadtest/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rstudio.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-02-14T06:46:53.000Z","updated_at":"2025-10-06T09:20:48.000Z","dependencies_parsed_at":"2025-09-08T15:41:28.885Z","dependency_job_id":null,"html_url":"https://github.com/rstudio/shinyloadtest","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rstudio/shinyloadtest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fshinyloadtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fshinyloadtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fshinyloadtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fshinyloadtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstudio","download_url":"https://codeload.github.com/rstudio/shinyloadtest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstudio%2Fshinyloadtest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28750875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T09:00:19.176Z","status":"ssl_error","status_checked_at":"2026-01-25T09:00:04.131Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T22:01:47.965Z","updated_at":"2026-01-25T09:34:52.360Z","avatar_url":"https://github.com/rstudio.png","language":"HTML","funding_links":[],"categories":["HTML","R","Developer Tools"],"sub_categories":["Testing"],"readme":"---\noutput: github_document\neditor_options:\n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# Load Testing Shiny Applications\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/rstudio/shinyloadtest/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/shinyloadtest/actions)\n\u003c!-- badges: end --\u003e\n\nThe [`shinyloadtest` package](https://rstudio.github.io/shinyloadtest/) and the accompanying [`shinycannon`](https://github.com/rstudio/shinycannon) command line tool make it possible to **load test** deployed Shiny apps.\nLoad testing helps developers and administrators estimate how many users their application can support.\nIf an application requires tuning, load testing and load test result analysis can be used to identify performance bottlenecks and to guide changes to infrastructure, configuration, or code.\n\nScientific load testing helps put to rest the common misconception that \"Shiny doesn't scale\".\nAs rstudio::conf(2018) Sean Lopp presented on [Scaling Shiny](https://posit.co/resources/videos/scaling-shiny/) which shows how to to horizontally scale an app to handle tens of thousands of users.\n\n## Installation\n\nTo perform a load test you'll need two pieces of software:\n\n-   `shinyloadtest` is an R package used to generate recordings and analyze results. You should install it on your development machine with `install.packages(\"shinyloadtest\")`.\n-   `shinycannon` is a command-line used to replay recordings in parallel. You can install it on your development machine for testing, but for best results we recommend installing it on a server, and preferably not the one the application under test is also on. See [installation instructions](https://rstudio.github.io/shinyloadtest/articles/shinycannon.html#installation) for operating specific install instructions..\n\n## Quick Start\n\nThe process for load testing a Shiny application consists of three steps:\n\n1.  **Record** a typical user session for the app.\n2.  **Replay** the session in parallel, simulating many simultaneous users accessing the app.\n3.  **Analyze** the results of the load test and determine if the app performed well enough.\n\nRinse and repeat as necessary.\nEach step is described below.\n\n### Step 1: Recording\n\nRecord a session using `shinyloadtest::record_session()`, which takes the URL of the **deployed** application as an argument:\n\n```{r, eval = FALSE}\nshinyloadtest::record_session(\"https://shinyapp.example.com/\")\n```\n\nRunning the function will open a browser displaying the app.\nOnce open, interact with the application as a typical user might then close the browser.\nAfter closing the app, a file (`recording.log` by default) will be created that contains a recording of the session.\nThis recording will serve as the basis for the load test.\n\nIf your application requires authentication, consult the [authentication article](https://rstudio.github.io/shinyloadtest/articles/load-testing-authenticated-apps.html).\nAlso be aware that [certain Shiny features](https://rstudio.github.io/shinyloadtest/articles/limitations-of-shinyloadtest.html) are not compatible with shinyloadtest.\n\n### Step 2: Run the Load Test\n\nWith the recording in hand, we're ready to run the load test.\nThe actual test is conducted outside of R using the `shinycannon` command-line tool.\nYou can run it using your system's terminal or console program, or you can run it from the RStudio IDE's terminal tab.\nA typical run looks like this:\n\n    shinycannon recording.log https://shinyapp.example.com/ --workers 5 --loaded-duration-minutes 2 --output-dir run1\n\n(On Windows, you will need to replace \"`shinycannon`\" with `java -jar shinycannon-VERSION.jar`.)\n\nSee [the shinycannon article](https://rstudio.github.io/shinyloadtest/articles/shinycannon.html#recording) for details.\n\n### Step 3: Analyze the Results\n\nNow we can analyse our results by reading the data into `shinyloadtest::load_runs()` and create a report with `shinyloadtest_report()`:\n\n```{R, eval = FALSE}\ndf \u003c- shinyloadtest::load_runs(\"run1\")\nshinyloadtest::shinyloadtest_report(df, \"run1.html\")\n```\n\nThis self contained html report will be opened in your browser for inspection.\nFor further analysis explanation, please visit [Analysing load test logs](https://rstudio.github.io/shinyloadtest/articles/analyzing-load-test-logs.html).\n\n![Analysis Example](man/figures/slt_report_screenshot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio%2Fshinyloadtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstudio%2Fshinyloadtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstudio%2Fshinyloadtest/lists"}