element-hq / element-hq/dendrite

Incoming events over federation can be slow to process

Open
#1,848 0 comments 0 reactions 0 assignees View on GitHub
C-Federation C-Roomserver T-Defect X-Performance
Dominant language
Go
Stars
965
Forks
101
PR merge metrics
No merged PRs in 30d

Description

*This issue was originally created by [**@neilalexander**](https://github.com/neilalexander) at .*

This is a combination of:

1. The federation API needing to round-trip to the roomserver to find out if auth events or prev events are missing;
2. Possibly having to then go and fetch them from a pool of servers which takes time;
3. Sending the events into the input API of the roomserver can block on per-room mutexes;
4. Calculating the state might not be terribly fast either.

Contributor guide

Open the contributing guide

Research direction

Trace the federation API through the roomserver lookup and input API, including missing auth or prev-event fetching, per-room mutex waits, and state calculation. Establish which stage causes the delay and define done as incoming federated events being processed faster without losing the required event and state handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.