views:

76

answers:

4

What is database design solutions for news portals with high trrafic? Could file system be a good solution?

mysql > File system

Thanks in advance

A: 

An RDBMS is much more suited to high traffic than a file system is. I would stick with using RDBMS for data unless it is proved that for a particular type of data, a file-system or some other solution is better.

Raj More
+2  A: 

Look into memcached. It is designed to "cache" objects and data. The best way to use it is to cache your news query results for 5 minutes, as an example. Therefore only one query gets executed every five minutes instead of each time a visitor views the page.

St. John Johnson
Another solution on a news portal is to cache the data without an expiration, and in the backend whenever an article is updated, to also update the cache. Obviously this solution is based on how often your content changes, if it's 1 every 15-20 minutes then this solution would be faster than if it was an update every few seconds.
William
A: 

High traffic? PostgreSQL is more robust, can handle more concurrent users. noSQL-databases are also getting populair, but these have different behaviour and functionality. You can't compare them with a RDBMS like PostgreSQL, Oracle or something like that.

Frank Heikens
Say it to the wikipedia or facebook folks.
Col. Shrapnel
Lets not get into a MySQL vs PostgreSQL battle, once you get to a certain "large scale" a database alone will not handle the traffic, at least not efficiently in terms of costs.
William
@ Col. ShrapnelCould you please share your solution for sites like wikipedia ?Thanks
@jasmine Facebook actually uses multiple Memcached servers for active memory caching.
St. John Johnson
+1  A: 

The filesystem is not a good solution for caching (unless you have a FusioIO card).

Generally, the delay involved in reading the file from disk is much higher than a caching system such as Memcache or APC.

There's also the option of using Sphinx or Lucene to index the database periodically, returning results much faster than standard MySQL.

andre
To add on to this comment, the main reason of using caches like Memcache or APC is because the data is stored in memory and not the file system.
William