Answer the question
In order to leave comments, you need to log in
Where and how to store recommendation service data?
Good day to all
I'm making a recommendation server: rating, reviews, recommendations.
(Thousands of recommendation objects + reviews) * (different languages). Read operations heavily outnumber write operations (>>5x).
Question: how to build a fault -tolerant service.
Oftop:
For some sites (php+mysql) there was no normal hosting. That technical work, then the server hung up. As a result, I made Master-> multi Master mysql replication + dynamic dns (SP is returned to "live" servers). 3 VPS allowed to work without a big downtime + when the hosting server "burned out", nothing was damaged.
That's just MMM replication worked with problems due to the remoteness of servers in data centers. I had to write bone scripts =(
Answer the question
In order to leave comments, you need to log in
What for to you for such task SQL ? Look towards NoSQL or engines like Elasticsearch...
If VPS in different data centers, then what are the consequences?
Mysql Percona Galera is your answer. Just don't forget to back up and write _always_ only to one node (don't care which one, just on synchronous writes to different hosts, the galley is noticeably dull).
3 DCs - well suited [email protected], [email protected], [email protected]
In general, mongo fits well with your case.
But in the paragraph "DBA is not needed" I can argue with you - with mongo you will sometimes find yourself in situations "the request slows down, but I don't understand why, but everything was cured by restarting the daemon." And Google, due to the youth of Mongi, will not always be able to help.
And now for your questions:
1. There should be no problems. Just keep in mind that when the master falls, one of the slaves takes on the role of the master, and the load on it will change, which must be taken into account in planning the server architecture.
2. Well, when the slave crashes, your reading performance will drop accordingly). And when the master falls somewhere in 1-4 minutes (depending on the configuration), a new master is selected. Here, the performance may drop a little at the moment when the old master turns on and synchronization begins, but again, it depends on the configuration and data volumes.
If necessary, I can consult in more detail on Skype)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question