testlara's avatar

how to design database for large website

Pls tell me Techniques to handle database of large website likes laracast or any printing media website .How to manage millions of users & articles?

0 likes
3 replies
lostdreamer_nl's avatar

Having good indexes.

MySQL (or any other DB) should be able to handle millions of rows easily. The only things you need to think about is:

  • how to abstract your data
  • which fields to index
  • and think ahead about what happens more: Read actions or Write actions (most apps have way more read then write actions)

When you have more read then write, you should make sure your data is written to the DB in a way that it's easy to get it out in the form you need it. Otherwise you'll be doing a lot of restructuring of data on every read action.

From this list, the abstraction and the indexes / foreign keys are the most important.

If your website gets bigger, you might also want to think about how the MySQL files are being handles (which partitions etc.) for the disk IO.

And if it gets even bigger, then you might want to switch away from MySQL to some distributed database solution.

jlrdw's avatar

How to manage millions of users & articles?

Write C++ classes to do heavy load, or use java technology such as EJB's, servlets / JSP.

PHP is not well suited for a Fedex / UPS size application.

Please or to participate in this conversation.