Answer the question
In order to leave comments, you need to log in
Linked Sites?
Let's imagine that there are three sites. 1) us.www.com 2) de.www.com 3) ru.www.com
Each site has its own server, its own statics and its own database. And all these servers are far from each other. Is it possible to make these three sites be one. So that static and dynamic content, for example, added to the site us.www.com, would be duplicated on other sites. That is, what would the database and statics be exactly the same on all sites. For example, Michael Jackson, while in the US, registers on the website us.www.com and adds his photos to his profile, like on Instagram. Gets likes and comments. In the meantime, while in the Russian Federation, I go to the site ru.www.com, enter the site "Michael Jackson" into the search engine and get to his page, with his photos, likes and comments, only the result I get is not from a server located in the USA , but from a server located in the Russian Federation. It's kind of like a CDN. Is it possible to implement such that everything would work correctly and quickly? And what technologies can be used for this.
Answer the question
In order to leave comments, you need to log in
Each site has its own server, its own statics and its own database. And all these servers are far from each other.
It's certainly possible - see Facebook, Linkedin, etc.
But it is difficult, especially for a database - both in principle (see https://en.wikipedia.org/wiki/CAP_theorem - it's about "both correct and fast"), and technically for "old" databases like MySQL or Postgres.
Therefore, I advise either to start with a simpler architecture (one server, or unrelated servers in different regions), or to take an architect and be prepared for the fact that it is difficult and expensive.
About statics - with a probability of 99.(9)% these are files that are synchronized by regular tools like rsync at the time of publishing changes, if these are upload files, then before publication, files are asynchronously sent throughout the cluster.
About databases
What would everything work correctly and quickly?If the speed is affected by a large distance between servers, then the problem is solved by master-master replication, sometimes writes will work slowly, but reads will be as fast as possible from a local copy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question