-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Description
Many cloud IDEs use CDNs with DDOS mitigations that break Vite. I convinced CSB to fix their Cloudflare config, but Replit and probably many others also share the same issue.
Suggested solution
It would be ideal if we could configure a way to limit requests per second to around ~50. Replit starts blocking requests at around 70 per second. CSB used to be much more problematic before they fixed it.
Alternative
HTTP/2 or bundling requests in a denounce queue might also help. Or reattempting failed fetches with gradual back off if they got a 429 response, which is what CSBs Cloudflare and Replit give when DDOS protection kicks in.
Additional context
No cloud sandbox is great, they all have problems... with performance, configuration, support, networking, secrets, pricing, mandatory third party subscriptions, etc.
Replit's non-injected service worker shenanigans mitigate the problem if you refresh enough. In CSB the problem was fatal. Although I can imagine situations where Replit's SW cache could be problematic.
Replit issue: https://replit.com/@fossprime/bug-replit-vite
CSB mitigated issue: codesandbox/codesandbox-client#6453
Update:
Rollup is working on the ability to set minimum chunk size... that could drastically lower overhead during dev.

Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.