1.0.18 • Published 3 years ago

@arcanebot/redis-sharder v1.0.18

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

REDIS-SHARDER IS NO LONGER MAINTAINED

Redis-sharder still works, and works very well. Arcane has only moved away from redis-sharder because the bot has been moved into a microservice architecture and no longer uses Eris so it no longer makes sense to continue working on this project.

redis-sharder

Redis sharder is a great solution for sharding with Eris. Managing shards for your large discord bot can be a major headache but with Redis Sharder all you need to do is code your bot and not worry about the issues of spawning and managing tons of shards. Redis Sharder is almost a drop in replacement and uses Eris's internal sharding. Redis sharder is not a clustering solution. You will need to cluster your bot yourself via some means or a process manager.

Clustering Solutions

  • Kubernetes
  • Docker Swarm
  • PM2 Clustering
  • NodeJS Cluster Module

Users of Redis Sharder:

As of 4/15/2021. | Name | Guild Count | Shard Count | | - | -| - | | Arcane | 551,000 | 288 | | Server Captcha Bot | 64,000 | 70 |

Help

Help yourself. We don't provide support for this in any discord server, including Arcane Support. You will be banned.

Installation

  • Add redis-sharder to your project. npm install @arcanebot/redis-sharder
  • Install and secure Redis on your machine. Redis Sharder requires redis to be secured with a password to use any eval functions because Redis is used for Pub Sub. PLEASE USE AUTHORIZATION!

Examples

You can view our quick start example here. It covers the basics to get you started with scaling your discord bot. You will need to create a config.json and supply your bot's token for the example to run.

Stats

<client>.getStats() outputs a Stats object. Use this over <client>.guilds.size.

{
  guilds: 9,
  users: 4099,
  estimatedTotalUsers: 4144,
  voice: 0,
  shards: [ { status: 'ready', id: 0, latency: 74, guilds: 9 } ],
  memoryUsage: { heapUsed: 27908672, rss: 83640320 },
  clusters: [
    {
      id: 0,
      shards: [Array],
      guilds: 9, we
      unavailableGuilds: 0,
      users: 4099,
      voice: 0,
      memoryUsage: [Object],
      uptime: 229
    }
  ]
}
1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago