Solving the problem of online cluster data out of sync

Two servers, 101 and 102, are deployed in the production environment. Nginx is used for load balancing to return HTML pages. The two JVMs cache data in memory. When the front-end page is modified, it is randomly sent to a certain server. This server updates Although the server has modified its own cache, the other server still modifies the previous data, which causes the data of the two JVMs to be inconsistent, and problems naturally occur.

In the case of load balancing and high availability, use JVM memory for caching with caution.

Guess you like

Origin blog.csdn.net/qq_43750656/article/details/132498627