Answer the question
In order to leave comments, you need to log in
UPDATED: Balancing requests from different countries (NGINX) and trying to log into an account from a country that was not registered from?
Good afternoon.
I am working on an application in one country where there is active registration and user activity. But now the task arose to enter another market (another country) and in order not to mix data from the current database and a new one (from another country), since this is not necessary, a copy of the application will be made from its database and through balancing requests at the country level (nginx ) requests will be redirected to the correct application.
But what if a user from one country who was registered in the application (in the database for his country) arrives in another country where he also has his own copy of the application and tries to log into his account. He will not be able to log in, since the balancer will throw him onto another copy of the application, which, of course, does not contain his data.
Maybe someone faced similar problems and you somehow solved them or know how to solve them?
Since I have no idea how to solve this problem.
I would be grateful for any of your thoughts.
PS: it makes no sense to shove everything into one database, since users from one country do not need to show data from another and vice versa.
PPP (Example Application):
There is a platform where any user can register their store and sell their products on it, there is also a page where all products from all stores will be placed. By visiting this page, buyers can see all the products and can make purchases.
But now there was a need to place this platform for other countries, but I don’t want to mix products from different countries. It is necessary that the user entering the system sees only those products and only those stores that are located in his country.
Also, users should not know anything about the fact that there are some other products and other stores from other countries. For them, it will just be a local platform for their country.
Answer the question
In order to leave comments, you need to log in
I will answer based on the topic and your comment
Application example:
There is a platform on which any user can register their store and sell their goods on it, there is also a certain page where all goods from all stores will be placed. By visiting this page, buyers can see all the products and can make purchases.
But now there was a need to place this platform for other countries, but I don’t want to mix products from different countries. It is necessary that the user entering the system sees only those products and only those stores that are located in his country.
Also, users should not know anything about the fact that there are some other products and other stores from other countries. For them, it will just be a local platform for their country.
Balancing by IP is possible only to reduce the load, but the data must be the same in any case.
In your case, use different domains (example.ru, example.it, example.ge) or subdomains (ru.example.com, it.example.com, ge.example.com) to separate the database
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question