V
V
VisualIdeas2018-03-15 14:44:11
RESTful API
VisualIdeas, 2018-03-15 14:44:11

How to optimally make a network of sites using RestAPI (Perhaps I described it crookedly)?

Good afternoon.
There is a task: Create a site similar to Yell (YellowPages, Yandex. Directory)
That is, directories of companies with reviews from different countries of the world (geography, ideally, the whole world).
I thought about the architectural solution and there are 2 options:
1) Stupidly make 10-20 copies of the site and distribute it to different, not large VDS
(Cons: Difficulty in maintaining and updating everything)
2) Make a single, central powerful server on which to host the RESTFull API, and for regions on small VDS it’s easy to make page builders based on data with API It’s
convenient to work, make edits, maintain integrity, a single place for everything .... The main thing is that data moderation from 1 place is super)))
Everything, it seems like 2 the option is nice, but what about PING and the channel?
Let's say I want to implement this on DigitalOcean servers - but what is their channel between their DCs?
Or in general, what is the best way to implement it?
You can, of course, cache all data on front-end servers, since there is usually a lot of space and servers on SSD ...
In general, who has any ideas ??
Sites on a bunch of PHP + MySQL
Sorry if it's chaotic)))
With respect to all who answered, Alexey.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2018-03-15
@Sanasol

None of the described options is a normal "architectural solution" for this task.
Especially if one person/office will manage all the sites, and not 20 offices each responsible for their own site.
You take one server and link all your sites there, or rather, just one site and geo-subdomains that lead to the same place, i.e. a single entry point in the application is standard.
All geo garbage is accordingly resolved at the application level. Including a redirect to the desired subdomain or switching to the desired language.
And for faster access, already install proxy servers in different places, but it’s better and easier to install the same CloudFlare, which for free itself proxies all traffic through the servers closest to the client.
As the load increases, scale the infrastructure with servers accordingly.
At the same time, you do not need to buy 20 servers in different countries to start.
In general, this is all much easier to do than it seems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question