this post was submitted on 02 Jul 2023
44 points (97.8% liked)

Selfhosted

40731 readers
336 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] savjee 1 points 2 years ago

I looked at how many WebSocket connections a single server could keep open, and it seems quite high: https://unetworkingab.medium.com/millions-of-active-websockets-with-node-js-7dc575746a01

That being said, I do agree with you that it's inefficient to open a connection to every other instance.

About your proposals:

  • I don't think your first solution is feasible. How would an instance know which other 10 instances to notify?
  • I do like your idea of batching operations together! Would definitely cut back on the amount of HTTP calls and signature validations. Perhaps this can even be extended further: right now every user interaction is signed before its been sent to other instances. Would be interesting if the instance itself also has a public/private key and that it can sign a whole batch at once (rather then signing every single user interaction).