Code Monkey home page Code Monkey logo

redis-sharder's Introduction

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 2/10/2022.

Name Guild Count Shard Count
Arcane 990,000 736
Captcha.bot (No longer using) 75,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
    }
  ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.