element-hq / element-hq/synapse
repeated calls to /login kills performance
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#5647](https://github.com/matrix-org/synapse/issues/5647).
---
A common pattern for scripts is to call `/login` for each invocation. The problem is that /login is quite expensive, as we have to notify every server in every room about the new device. This gets worse as you accumulate more and more devices.
`/login` is rate-limited, so there's a limit to the damage you can cause, but still, it's possible to impair the server performance, and accumulate thousands of devices.
Perhaps we need a more granular rate-limit (only 10 new devices per day, or something?) Or some other way of discouraging people from calling /login frequently?
Related: #4934, #2704
Contributor guide
Assessment
This issue has not been assessed yet.