Solution 1: the database and server are deployed on the same server. Solution 2: the database and server are deployed on two servers separately. What are the advantages and disadvantages of these two solutions? Generally, what is the applicable situation? If the second solution is adopted, how can this problem be solved if the speed is much slower? Now, project... the first solution is to deploy the database and server on the same server.
Solution 2: the database and server are deployed on two servers separately.
What are the advantages and disadvantages of these two solutions? Generally, what is the applicable situation? If the second solution is adopted, how can this problem be solved if the speed is much slower?
Currently, the project server uses Flask, which is not limited to other languages. Of course, the practical experience of python falsk is better.
Reply content:
Solution 1: the database and server are deployed on the same server.
Solution 2: the database and server are deployed on two servers separately.
What are the advantages and disadvantages of these two solutions? Generally, what is the applicable situation? If the second solution is adopted, how can this problem be solved if the speed is much slower?
Currently, the project server uses Flask, which is not limited to other languages. Of course, the practical experience of python falsk is better.
Security. The database is independently deployed on one server and communicates with the web server over the Intranet. The database server is 100% isolated from the Internet, the only source of the attack is the machine in the LAN (that is, the web server, that is, the web program ). Therefore, it is generally recommended to deploy independently.
In the initial stage, the cluster is usually deployed on another server and then considered separately. If a web server has a web server cluster, consider Server Load balancer. Databases have database clusters, including database sharding and read/write splitting.
Databases are not exposed to external networks.
The speed of servers and data deployed in the Intranet Communication Environment of the two machines is not significantly affected.