0

I would like to know your opinion about how to build the best database architecture posible.

This is a website, let's say it is a forum, with traffic from everywhere around the globe.

I'm trying to figure out the best way, because now we have multiple apache servers around the world, connecting to a main database in EU, the performance is not really good, obviously.

So I'm thinking in the mysqi replication "system" can it be good or not for me? The idea is to have a main mysql server in EU (where all clients will write), and replications of this mysql database in each apache server for read-only.

So, users from NA will connect to a NA server, will read from a (replicated) database in NA and writing in the main EU database.

Do you think this is a good idea? Is mysql replication good enough for that?

If a user from south america, writes in the EU server, how long this database row will take to be available in the South america server to be read?

Hope my english is good enough and you can understand me :)

Thank you

John
  • 1
  • Do you actually need servers all over the world? A CDN would probably be a better bet here. No one blinks an eye at a couple hundred ms to submit a forum post once in a while; it's the reading that needs to be fairly snappy. – ceejayoz Jun 20 '20 at 16:13
  • I'm not really sure, I already have all css, js, images in amazon cdn but I'm worried about the database read speed, I don't think a user with a 250ms latency will have a good database reading performance... – John Jun 20 '20 at 16:19
  • If your forum software can work with that setup, then it is a possibility. However, I would look into database caching first. Each satellite node would have a cache of database queries / responses, and that would be used for reading data. – Tero Kilkanen Jun 20 '20 at 18:22
  • 1
    What exactly does "performance is not really good" mean, can you quantify that? What is the distribution of interactive response times? Do have have user feedback that it is slow? What fraction of the latency is network, and what part is the database query itself? – John Mahowald Jun 20 '20 at 20:33

0 Answers0