element-hq / element-hq/synapse

synapse loaded by lots of /federation/v1/event/... requests

Open
#2,164 0 comments 0 reactions 0 assignees View on GitHub
A-Federation A-Performance O-Uncommon S-Minor T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 6h
Merged PRs (30d)
46

Description

This issue has been migrated from [#2164](https://github.com/matrix-org/synapse/issues/2164).

---

Every so often, my synapse goes off and spends a couple of hours spinning at 100% CPU. Investigation reveals that it is mostly spending that time processing /federation/v1/event/ requests - basically some other server in the federation starts hammering it for a load of events.

There are two questions here:
* why are other servers hammering it?
* it seems surprisingly expensive to serve the request. The CPU times are quite variable but some of them are over 200ms per request - which takes a while when there are tens of thousands of requests.

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.