What's the maximum number of categories we can have?


(James L ) #1

I’m considering using Discourse as the backend for my website and app, but I haven’t seen any documentation on its scaling limits.

What’s the maximum number of categories we can have? Is it 1000? 10,000? 100,000?

I plan to heavily use the API and create a custom frontend for both web and mobile. Part of this is programmatically creating a new Category whenever a user wants to. So it’s more of a backend systems question than the UI.

For example, will the /categories.json endpoint scale? It doesn’t seem paginated.

Thanks!


Is anyone using Discourse in higher ed for courses?
(Sam Saffron) #2

500 to 1000 is safe

If you need more consider tags

Additionally you can have a very large number of groups


How many categories can discourse support?
(James L ) #3

Thanks @sam! Follow up question – what would the approximate limits be for:

  • the number of tags
  • the number of topics in a category

For example, can I have a few million unique tags, as well as a few million topics within a single category?

The tags, topic_tags, and topics tables don’t appear to be sharded, which should work for a few million rows, but I haven’t looked into the queries themselves, nor any UI that could potentially break.


(Andrew Waugh) #4

Is there a table somewhere showing this kind of information?

The default post size is 32000 characters, for example, but what is the absolute max, what is the practical max?


(Mathias Källberg) #6

Hi! Just wondering if you found the answer to this? Specifically I’m also wondering about the max number of tags.


(Mittineague) #7

Determining a “maximum” depends on what you consider to be the limiting factor.

I don’t see a problem with PostgreSQL
PostgreSQL: About

Maximum Table Size 32 TB

Even with optimal indexing, query speeds will at some point take “too long”. What that is will vary from person to person.

Then there’s Ruby, Ember, bandwidth and browser limits. Feel free to research, but I wouldn’t worry about those.

I think that long before any software limits are reached “sane” limits will have already been passed. And what that would be will vary from person to person and how they interact with the information.

tl;dr You will break your users long before you break any code.