RE:NODE
ჰოსტინგი

რესურსები5 წუთის საკითხავი

Picking a plan for a Discord bot

Bots are cheap to run and expensive to run badly. What actually consumes memory, when a bot needs a database, and the plan most people over-buy.

ეს სტატია ჯერ ინგლისურადაა. ვთარგმნით.


A Discord bot is a long-lived process holding a websocket open. That costs almost nothing. What costs something is the cache: a library that keeps every member of every guild in memory scales with your success rather than with your code.

Where the memory goes

  • The member cache, which is the whole answer on any bot in large servers.
  • Audio, if the bot plays music; each stream is real memory and real CPU.
  • Anything you kept in a variable because a database felt like overkill.

The plan most people over-buy

A command bot in a handful of servers runs comfortably in 512 MB. A music bot with several concurrent streams wants 2 GB and a CPU that is not shared with something noisy. Start small; the graph will tell you when to move, and moving takes a minute.