19.0.0-next.2d02c32 • Published 8 months ago

@discordeno/gateway v19.0.0-next.2d02c32

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

Discordeno WS

Discord API library for Node.JS, Deno & Bun

Discord codecov action status

!WARNING Using a Standalone / Proxy WS is mean for advanced developers only

Standalone WebSocket to connect to the Discord API.

  • Zero Downtime Updates:

    • Your bot can be updated in a matter of seconds. With normal sharding, you have to restart which also has to process identifying all your shards with a 1/~5s rate limit. With WS handling moved to a proxy process, this allows you to instantly get the bot code restarted without any concerns of delays. If you have a bot on 200,000 servers normally this would mean a 20 minute delay to restart your bot if you made a small change and restarted.
  • Zero Downtime Resharding:

    • Discord stops letting your bot get added to new servers at certain points in time. For example, suppose you had 150,000 servers running 150 shards. The maximum amount of servers your shards could hold is 150 * 2500 = 375,000. If your bot reaches this, it can no longer join new servers until it re-shards.
    • DD proxy provides 2 types of re-sharding. Automated and manual. You can also have both.
      • Automated: This system will automatically begin a Zero-downtime resharding process behind the scenes when you reach 80% of your maximum servers allowed by your shards. For example, since 375,000 was the max, at 300,000 we would begin re-sharding behind the scenes with ZERO DOWNTIME.
        • 80% of maximum servers reached (The % of 80% is customizable.)
        • Identify limits have room to allow re-sharding. (Also customizable)
      • Manual: You can also trigger this manually should you choose.
  • Horizontal Scaling:

    • The proxy system allows you to scale the bot horizontally. When you reach a huge size, you can either keep spending more money to keep beefing up your server or you can buy several cheaper servers and scale horizontally. The proxy means you can have WS handling on a completely separate system.
  • No Loss Restarts:

    • When you restart a bot without the proxy system, normally you would lose many events. Users may be using commands or messages are sent that will not be filtered. As your bot's grow this number rises dramatically. Users may join who wont get the auto-roles or any other actions your bot should take. With the proxy system, you can keep restarting your bot and never lose any events. Events will be put into a queue while your bot is down(max size of queue is customizable), once the bot is available the queue will begin processing all events.
  • Controllers:

    • The controller aspect gives you full control over everything inside the proxy. You can provide a function to simply override the handler. For example, if you would like a certain function to do something different, instead of having to fork and maintain your fork, you can just provide a function to override.
  • Clustering With Workers:

    • Take full advantage of all your CPU cores by using workers to spread the load. Control how many shards per worker and how many workers to maximize efficiency!

Links

19.0.0-next.f57e2e9

12 months ago

19.0.0-next.01437eb

11 months ago

19.0.0-next.fb8af2b

11 months ago

19.0.0-next.5cccaea

12 months ago

19.0.0-next.b61cabe

11 months ago

19.0.0-next.895cc17

11 months ago

19.0.0-next.45bfa05

10 months ago

19.0.0-next.c1fd19c

11 months ago

19.0.0-next.d6898f2

11 months ago

19.0.0-next.08a5e44

10 months ago

19.0.0-next.2def050

12 months ago

19.0.0-next.4899d0a

11 months ago

19.0.0-next.6584a3b

10 months ago

19.0.0-next.8dc6c3f

11 months ago

19.0.0-next.e315ee6

11 months ago

19.0.0-next.aecc55d

12 months ago

19.0.0-next.4d1e915

12 months ago

19.0.0-next.a1af1ff

12 months ago

19.0.0-next.b706358

10 months ago

19.0.0-next.3122285

11 months ago

19.0.0-next.a2d8afb

12 months ago

19.0.0-next.3daf71a

12 months ago

19.0.0-next.402f1b3

11 months ago

19.0.0-next.06664ed

11 months ago

19.0.0-next.9cea65f

12 months ago

19.0.0-next.c1b0dc9

10 months ago

19.0.0-next.22a6117

11 months ago

19.0.0-next.2421ae2

11 months ago

19.0.0-next.c132b0d

12 months ago

19.0.0-next.6ac3486

11 months ago

19.0.0-next.9e516a0

10 months ago

19.0.0-next.e30e5a2

11 months ago

19.0.0-next.87f62d2

11 months ago

19.0.0-next.7836ec3

11 months ago

19.0.0-next.8ad8b5d

11 months ago

19.0.0-next.97a8016

12 months ago

19.0.0-next.f479660

12 months ago

19.0.0-next.84e145e

11 months ago

19.0.0-next.658acfb

11 months ago

19.0.0-next.7c404ee

11 months ago

19.0.0-next.48902bc

10 months ago

19.0.0-next.a7c5351

12 months ago

19.0.0-next.faaa8af

11 months ago

19.0.0-next.fda3003

12 months ago

19.0.0-next.b16e9b7

12 months ago

19.0.0-next.9e101a0

11 months ago

19.0.0-next.4142946

11 months ago

19.0.0-next.2f89d4d

12 months ago

19.0.0-next.b1bfe94

10 months ago

19.0.0-next.c7e0ccc

11 months ago

19.0.0-next.985801c

11 months ago

19.0.0-next.791943a

11 months ago

19.0.0-next.49ce2e4

12 months ago

19.0.0-next.bb6b8df

11 months ago

19.0.0-next.02512c9

12 months ago

19.0.0-next.b3a8c86

10 months ago

19.0.0-next.ab6f632

11 months ago

19.0.0-next.b20e12d

12 months ago

19.0.0-next.62b3122

11 months ago

19.0.0-next.a0510da

10 months ago

19.0.0-next.b68af86

12 months ago

19.0.0-next.c7b44e5

11 months ago

19.0.0-next.27fc12e

11 months ago

19.0.0-next.6cf16bd

11 months ago

19.0.0-next.727c710

11 months ago

19.0.0-next.c400009

11 months ago

19.0.0-next.0819d2b

11 months ago

19.0.0-next.304a61c

11 months ago

19.0.0-next.6762bd4

12 months ago

19.0.0-next.893639c

12 months ago

19.0.0-next.943821f

10 months ago

19.0.0-next.f9bdfce

11 months ago

19.0.0-next.39b18a1

12 months ago

19.0.0-next.57fa3d4

10 months ago

19.0.0-next.ce4eb2c

11 months ago

19.0.0-next.495c532

11 months ago

19.0.0-next.ef4cc80

11 months ago

19.0.0-next.e12142d

12 months ago

19.0.0-next.0a54931

11 months ago

19.0.0-next.0d9c4da

12 months ago

19.0.0-next.9cca689

12 months ago

19.0.0-next.24ea6f8

12 months ago

19.0.0-next.991609d

11 months ago

19.0.0-next.e0209cf

11 months ago

19.0.0-next.9ec197a

12 months ago

19.0.0-next.af6ffc3

11 months ago

19.0.0-next.48bc543

12 months ago

19.0.0-next.9e1ada6

11 months ago

19.0.0-next.14d5e2f

11 months ago

19.0.0-next.4778968

11 months ago

19.0.0-next.d1a91b9

11 months ago

19.0.0-next.40ad082

10 months ago

19.0.0-next.352887c

10 months ago

19.0.0-next.2353343

11 months ago

19.0.0-next.9194740

11 months ago

19.0.0-next.ee11d39

11 months ago

19.0.0-next.746f0a9

11 months ago

19.0.0-next.ab2930c

11 months ago

19.0.0-next.14b0158

11 months ago

19.0.0-next.a80036f

10 months ago

19.0.0-next.749acbc

12 months ago

19.0.0-next.53649f1

12 months ago