CraftingStore used MySQL replications to sync between the backend and the frondend, to ensure the highest up-time possible.
But this had a problem; One of the front-end servers went out of sync and I didn't notice it for ~2 hours. So this was no option, after this happend I made a new "idea" for syncing the databases, on application level.
The problems I had with MySQL replications;
- In a normal setup, you may only have 1 master server.
- Its a paint to set-up, and if something goes out-of-sync you have to re-sync them manual, and you won't get a notification.
The new system;
- Alle servers are master, and slaves. At the same time.
- If a server goes offline, the queries will run when it comes back online.
The system is live for some time, and all the found bugs have been filtered out. I consider it stable
For the standard user, this just means that your store will stay online. Even if one of the servers goes down. Another server will take it over, and it will serve the same store, because the data is synced between them. And if you make changes to your shop during a partial "blackout" the changes will be cached until it's back. While sill keeping the "online" servers up-to-date on the fly.
Everything is monitored, and when one of the servers reacts to slow, a second server will take it over without any human interference.