Forum database
Author
Discussion

V8S

Original Poster:

8,582 posts

266 months

Thursday 8th May 2008
quotequote all
I heard someone say a while back that forum posts, when they are submitted, go onto an intermediate database before being transferred to the main one almost instantly. It was also said that this sometimes causes the forums to go wonky; for example, like showing a Last Contributor as X in the forum listing, but when you go into the thread it's still the previous contributor Y's post you've already read (if that makes sense).

Anyone willing to give the reason why it's done like this? I'm interested from a technical angle.

RacingPete

9,196 posts

233 months

Thursday 8th May 2008
quotequote all
We have a master server and multiple replication (slave) servers. Thus all updates and inserts are done to the master and then replicated to the slaves.

Most of the pages on this site read from the database, so we have more read servers (slaves) to handle these requests. Thus the load on the databases, and the amount of servers needed is split between the requirements of the site. 5x reads to writes.

The problems we have experienced recently are down to disk access speeds as when the site is busy the slave updates are coming in quickly on the same disk as the database is trying to read from and thus the computer doesnt keep up and does not replicate the updates from the databases as quick. This (depending on the random slave server you get when viewing a page) will mean that you may see data that isnt upto date, maybe 30 seconds behind what the master has, and thus looks like posts dissapear and back.

Many big sites run with a similar setup (Yahoo! Finance, Yahoo! News etc). For example the Yahoo! Finance site needs upto the minute information from the finance market, in the same way that the PH Forums need, to work properly, upto date information that is posted. Thus when a slave falls behind it is a big issue and thus something we have been working hard for the last couple of weeks to solve.

BlueEyedBoy

1,954 posts

225 months

Thursday 8th May 2008
quotequote all
What's the technology you are using?

Silent1

19,762 posts

264 months

Thursday 8th May 2008
quotequote all
BlueEyedBoy said:
What's the technology you are using?
That's a sekritwink