问题原文
原帖链接 · LeoZ · CC BY-SA 4.0
I want two same websites to share one database. One server is in Asia, hosting a website and the database. Another server is in the US, hosting the same web via remote database. However, the web in the US responds very slow but when moving the database to the local server(US server), the web responds fast. How to speed up the connection between the server in the US and the database in Asia?
I am using Centos7+Nginx+MySQL.
社区高分解答
原帖链接 · vidarlo · CC BY-SA 4.0
How to speed up the connection between the server in the US and the database in Asia?
You probably can't. US-Asia is a long distance, and there's latency involved. Simply put: the light has a finite speed.
You should probably look into alternatives to querying a remote database, such as caching assets in multiple locations, using a CDN, or using a database replication scheme so that you can have local copies of the data.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
