Have a question for shiny developers with kubernetes experience.
Has anyone experienced intermittent timeouts / errors downloading files from shiny using shiny::downloadHandler
when a set of pods are provisioned via a horizontal pod autoscaler (HPA)?
My experience / observations are as follows:
- User goes to app, downloads file successfully
- HPA provisions a couple more pods of the shiny app due to resource usage
- Another user goes to apps (around same time of HPA scale up), downloads file unsuccessfully
- Same user refreshes the page, downloads file successfully
If I turn off the HPA and set the number of pods to something static, this issue never happens. Does anyone have any ideas?
From the logs, I see that my load balancer occasionally shows a 404 on download handlers: [10/Oct/2023:12:59:16 +0000] GET /session/3c6a68f303fa7a5644f8b4494d0d5dbd/down...
So wondering if there is something weird with the session ID when it comes to HPAs?
Think I figured it out: Session ID/token exposed with downloadHandler · Issue #3748 · rstudio/shiny · GitHub