This is kinda strange, especially as everything we have made including storing files in the file storage platform is all saved into MySQL databases. But when the website builder was in the planning stages a huge problem was discovered about databases like MySQL and others, they do not scale.
They do not scale…. That’s what they are made for…
No not scale as in requests per second and complex comparisons. If thats what you are after a standard database application is best. But we are not talking about complex actions that require comparison across tables. We chose early on the scale and amount of databases and problem that can happen to them for each site would be insane. No standard site needs databases with complex lookup logic, they need lists and rules.
What flat file databases do best
They are small, instant, and require almost no resources on lookup. For the website builder we store all pages as a JSON page with it’s internal blocks stored as items in the JSON array. This is also done for blog posts and settings. Each account are stored in JSON files that are under 1KB in size each. This makes things scale easily as we are not dealing with large complex database tables.
Management and fixing problems
This is where databases like MySQL fall flat, have you ever had to find why a table was slow, why a data was not loading, why the service stoped and wont start again, or even just had the connection broken during a table update loosing data… We have many times. We spend at least a day managing databases a month as it is for our internal systems, now imagine that for every single site that we must now maintain.
Got any questions?
Feel free to comment any questions you have about this choice we made.