R
R
Roman Terekhin2015-06-24 13:30:58
PHP
Roman Terekhin, 2015-06-24 13:30:58

Many many different html - separate files or database?

Actually, when designing SaaS "blah blah blah" there was a stumble: there are a lot of people, each will have 100,500 lines of selected html (without complying with standards, of course), and it's not clear where to store them.
There are not many options - separate files in a directory specially created for a person, or a database. It was then that vague doubts began to torment.
Let's say in the files - everything is nice and good, there is no extra layer, direct access and that's it, the RAID array will make it fast and reliable, but what if I have not 1 user, but a thousand or ten thousand (each has 4-7 files)? 1 or 10+ thousand directories with files, karl!
Database (it is necessary to do serialization from all sorts of sql injection lovers): there is where to roam, but which one to choose? The first sqlite gets into your head, but only if you figure out the numbers - ~ 10k records with strings of 1k characters or more, it's a big file, won't the execution time fly up to several seconds while the driver opens it?
Next on the list - mysql / maria - I don’t know here, I need advice from experienced experts, it’s not clear how the database will behave with such volumes.
Further nosql, but there are so many of them that the eyes run wide.
Attention connoisseurs, the question is: What to use?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fortop, 2015-06-24
@Fortop

Store in files if you do not need to make selections / filtering / calculations on files and their contents.
Our server (one) holds tens of millions of cache files (of course, not in the same folder).
Similarly, with the database - 900 million records with an average size of 2 kb.
Everything is alive.
Using nosql in the general case is inappropriate for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question