21.0.0 • Published 5 months ago

@discordeno/gateway v21.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 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

11 months ago

19.0.0-next.0a9f9ee

12 months ago

19.0.0-next.81b3b28

12 months ago

20.0.0-next.6ca797b

10 months ago

19.0.0-next.84d20a2

12 months ago

20.0.0-next.f0b8cd4

10 months ago

20.0.0-next.618d8dd

11 months ago

19.0.0-next.e8391e8

11 months ago

19.0.0-next.7cf2ad3

12 months ago

19.0.0-next.cfdf770

12 months ago

21.0.0-next.cd396cf

10 months ago

19.0.0-next.87e6cd0

12 months ago

20.0.0-next.3fd075a

10 months ago

19.0.0-next.f137efa

11 months ago

21.0.0-next.b939e12

10 months ago

19.0.0-next.19b3d09

11 months ago

21.0.0-next.55af73e

10 months ago

20.0.0-next.41219d5

10 months ago

21.0.0-next.27808be

10 months ago

20.0.0-next.96f4b9b

10 months ago

21.0.0-next.a0fec36

10 months ago

21.0.0-next.4f43b50

10 months ago

19.0.0-next.dfa7ff4

12 months ago

20.0.0

11 months ago

19.0.0-next.8997837

12 months ago

19.0.0-next.61acc57

12 months ago

20.0.0-next.41c614c

11 months ago

19.0.0-next.dbf4fda

12 months ago

19.0.0-next.3b69f22

11 months ago

21.0.0-next.b0c1b9f

10 months ago

19.0.0-next.a6b9bad

11 months ago

21.0.0

10 months ago

19.0.0-next.33ec4d1

12 months ago

21.0.0-next.f2f7f11

10 months ago

20.0.0-next.e06f46e

10 months ago

19.0.0-next.4709042

12 months ago

19.0.0-next.59fa35d

12 months ago

19.0.0-next.fb9aac0

11 months ago

21.0.0-next.86a446e

10 months ago

19.0.0-next.078036f

11 months ago

21.0.0-next.afb9e3a

10 months ago

21.0.0-next.c569805

10 months ago

19.0.0-next.afb1fa5

12 months ago

19.0.0-next.3f3801e

11 months ago

19.0.0-next.eb20050

12 months ago

19.0.0-next.87de1ac

11 months ago

20.0.0-next.58fccd8

11 months ago

19.0.0-next.1e6de1d

12 months ago

19.0.0-next.cf5e033

11 months ago

19.0.0-next.8bbc61d

12 months ago

19.0.0-next.376b29d

11 months ago

19.0.0-next.91b5b19

11 months ago

19.0.0-next.b1036b2

12 months ago

20.0.0-next.bee999b

10 months ago

19.0.0-next.4939822

11 months ago

19.0.0-next.c5a9a64

11 months ago

19.0.0-next.d58de64

12 months ago

19.0.0-next.f40da4c

11 months ago

20.0.0-next.8482859

11 months ago

19.0.0-next.4e4655b

12 months ago

21.0.0-next.21e81c0

10 months ago

19.0.0-next.b42de2e

12 months ago

19.0.0-next.2762b48

11 months ago

19.0.0-next.5f1ee0f

12 months ago

20.0.0-next.01638a0

10 months ago

21.0.0-next.efc15e1

10 months ago

19.0.0-next.a3ab41d

11 months ago

21.0.0-next.ceec87f

10 months ago

20.0.0-next.6abf453

10 months ago

20.0.0-next.d478e67

10 months ago

19.0.0-next.ffdef6c

11 months ago

19.0.0-next.2d02c32

12 months ago