V
V
Viktor Batienko2019-01-17 02:49:19
Yii
Viktor Batienko, 2019-01-17 02:49:19

How to reduce the time of getting data from a remote database?

There is a server A with api over the hill
There is a server B with a base on mongodb in the Russian Federation (thanks to FZ-152)
ping between servers 121ms.
we have redis for cache
When working with a local database, the time to receive all data by a heavy request takes 1.5 seconds (+redis reduces to 0.2ms)
But if Server A is switched to work with the database on server B, we get the time to receive data from it to 3)
How to eventually achieve a result of at least 5 seconds or less without redis
I will be glad to hear advice / answers not only for mongodb and any other databases, I think the logic will be the same.
So far, only the creation of a tunnel with a permanent connection from server A to B has come to mind. But I'm not sure that this is the way out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hack504, 2019-01-17
@xaker01

And the replication of the database over the hill violates FZ-152? (Not). Reading from local, writing to remote.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question