1

I would like to create a message board that has separate forums for each movie, each actor, each director, etc. With modern forum software, is having many thousands of forums like this impractical for technical reasons?

1) I've heard that in, say, phpBB, the more forums you have, the greater the load on your database server. Why should that be? Why would there be more load on the server if you have 1000 boards each with 1 post, as opposed to 1 board with 1000 posts?

2) Also regarding phpBB, I've heard that you'll run into problems if you get over 1000 forums, because the permission checks back to the database will start to really slow things down. Again, why should this be the case?

For a purely database-specific perspective, if I have a table for each forum, I don't see what the problem is with having many thousands of forums. Are the problems above specific to phpBB? If so, is there forum software which would not have a problem with having thousands of boards?

(By the way, I realize there are logistic problems with having thousands of forums, which is why I would also want to make a front page which allows users to easily see the most recent posts in a few recently-visited forums. I'm not sure if the existing forum software will allow me to do this. Ideally I would prefer to write my own forum software, but that's a crazy amount of work for a small non-commercial project.)

  • Is it your plan to have one installed version of the forum package running all the forums, or a separate installed copy of the package for each forum? If you're willing to run thousands of forums, I have to surmise that space and bandwidth of not a concern. In that light, you might investigate the option to run individual forums with their own copy of the software. That should mitigate and of the issues you've heard about phpBB, or other packages. Additionally, as your ideal is to write your own software, I presume you're able to read the source for phpBB and verify/debunk what you heard. – user73967 Feb 14 '17 at 3:30
  • My plan is to have one installed version of the forum package. Having thousands of separate installations would be unmanageable. Primarily, I'm interested in why having separate forums would result in the technical problems I've mentioned. – std_answ Feb 14 '17 at 4:10
  • To be terminologically clear, each forum holds threads, and each thread holds posts; from the point of view of database management, having many forums doesn't create that much more storage than if all the threads went in a single forum. Additionally, many forums would never accumulate that many posts, say those about some obscure director. – std_answ Feb 14 '17 at 4:10
  • I'm not a developer of a forum package, so can't say why the above issues exist. I also can't say they do exist. I've heard Santa Claus is coming as well. Because of the possible future value of the forums you envision, it seems like you need to audit the software, and do some of your own benchmarking. Perhaps spin up a VM to host it, set verbose logs, and trap the queries to the database. Look to prove what you heard, and if you can't then you'll be in a better position to support your choice of forum software, if and when you are called to do so. Better set to create your front page too. – user73967 Feb 14 '17 at 5:17
  • Forum software historically has not always been optimized except for typical usage. Scale should not be an issue otherwise. However, if you intend to use the forum differently, you may need to put on your coder and DBA hat and optimize it for your specific purpose. By the sounds of it, any forum software may not fit the bill as you describe it. Coding your own forum should not be that difficult if you know how to create a well optimized schema. The code should be trivial after that. – closetnoc Feb 14 '17 at 6:48
1

With modern forum software, is having many thousands of forums like this (using one copy of the forum software package for all forums) impractical for technical reasons?

Part of the answer is dependent on the forum software. If the software is poorly written, it is possible that it makes alot of disk accesses and alot of database requests, etc.

More importantly, the server logs are where you will look for answers. If you try your experiment, check your database access logs, and web server access logs to see what is being requested the most/least and at what times. Multiple requests in the same second is a clue that someone may be trying to hack the server.

Just think of running 1000 forums like you running a dedicated server with 1000 websites on it. The effect is the same in both cases. Slowness is really noticed when the number of requests made to the server exceeds the connections the server has available, and its noticed more if the server is run on a very old computer.

0

I think I see where you are going with this. You talk about having a table for each forum, this is not all that common at all in forum engines. To give you a very broad strokes run down on the database schema for the "average" forum software you have 1 table containing a list of all the forums, another table containing a list of every post made to every forum, another table containing a list of every reply made to every post in every forum.

Now if we go from the start now and say we open the site to show forum1, it first makes a call to the forums list table to get the details of the forum in question. It then makes another call to the posts table to get a copy of all of the posts to do with that specific forum to show on the page. Now on a relatively small database not a big issue but when we are talking large databases (for example needing to search a database table containing many millions of records for the specific records to do with a particular forum it can get intensive.

Now this was a very broad strokes outline of the way that most off the shelf forum software operates. They are designed to cover a reasonably small range of topics that are related in some way, such as a company forum, sports forum (with a forum for a range of the various kinds of sports), etc. At most they may have 10 categories of forums, perhaps 30-40 forums, maybe some sum forums depending on the topic, but this is a far cry from the many thousands that you are proposing. The issue here is that off the shelf forum software is designed to meet the needs of the 90% of cases where a basic average forum software is needed. What you appear to be in need of is a custom developed and engineered forum engine to specifically meet the needs of your site.

You may be needing to look at some of the following...

  • Multiple web servers serving your forum engine behind a load balancer to handle high availability and the high load on the system.
  • Clustered database server environment running multiple read only replicas to provide a more reliable write service and decrease the load on the main write server.
  • A data caching layer and potentially even a page caching layer, to cache the database calls to memory to reduce the amount of database calls being made, and to cache the completed pages to decrease the number of calls to the back end application servers.

These are just some of the things that you would need to look at if you are talking many thousands of forums, and you have to remember to plan ahead when it comes to what your needs are going to be. Each forum may only have 1 post to begin with but each forum could wind up with many many posts in them. Lets crunch some numbers here, there are around 155'100 people employed as actors, producers, and directors in the US alone. If we increase this to say that half the worlds actors, producers, and directors all reside in the US then we can say that there are 310'200 individuals who you would be looking at creating a forum for, and that does not count past individuals who are now deceased. From here lets us give a starting post of one per forum...

At this point we have the following...

  • 310'200 records in our forum table
  • 310'200 records in our posts table
  • 0 questions in our replies table

Now lets say that the forum is in production and people are coming to visit and ask questions and post answers around their favourite actors, producers, and directors. For the sake of argument lets say that an average of 1000 new questions has been asked in the first month alone, and that an average of 500 new questions a month are being asked after that. Then lets say that an average of 10 replies per question is made. Now these are just random values and anyone who has used forum engines previously can probably attest that they are a little on the conservative side. At this point after the first month we have the following...

  • 310'200 records in the forums table (this is unlikely to change frequently)
  • 310'200'000 records in our posts table
  • 3'102'000'000 records in our replies table

And each month after the following number of records are being added...

  • 155'100'000 records added to the posts table
  • 1'551'000'000 records added to the replies table

So after 12 months in production the database may look something similar to this...

  • 310'500 records in the forums table (an extra 300 studios, producers, actors, and directors have come into the business in the last 12 months)
  • 2'171'400'000 records in the posts table
  • 21'714'000'000 records in the replies table

Now it is true that MySQL can scale quite easily to hundreds of millions of records without exotic hardware requirements but within the first 12 months we are talking many billions of records, with millions of reads and writes per day.

As you can probably see by now doing something like what you are wanting to achieve using a standard off the shelf system is not going to really work out well as it will need to be specially designed to meet your specific use case in order to optimise everything possible for big data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.