Broadcasting same event for a lot of subscribers doesn't scale
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.5k
- Forks
- 468
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 2
Description
Broadcasting the same event to a higher number of subscribers (say 100+) takes a lot of time (couple of seconds). This is due to the Lighthouse Subscriptions design - each Subscriber has its own separate channel.
In some cases this is probably not ideal. Imagine implementing a chat platform with "chat rooms" feature. If someone sends a new message, others should received it ASAP and not wait until it's delivered to every-single-one over its own channel. One channel (per room) should be used instead.
In comparison, broadcasting an event directly using Pusher console, the event is delivered to all 100 subscribers in an instant (=it doesn't depend on the number of subscribers in the channel).
Not sure if it's a bug or a matter of design decision, but I would really appreciate your view on this topic.
Thank you very much!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Lighthouse Subscriptions design described in the issue and the existing channel behavior for many subscribers. Compare the per-subscriber approach with the reported Pusher console behavior, then establish whether shared channels are desired and define measurable delivery-time criteria before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, laravel, php
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100