element-hq / element-hq/synapse

repeated calls to /login kills performance

Open
#5,647 0 comments 0 reactions 0 assignees View on GitHub
A-Device-List-Tracking A-Login A-Performance T-Enhancement z-p2
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.